mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Fix clang-tidy bugprone-multi-level-implicit-pointer-conversion warnings
This commit is contained in:
parent
9e83759e83
commit
d0bbc61bd4
3 changed files with 13 additions and 3 deletions
|
@ -340,7 +340,9 @@ Manager::Filter::~Filter() {
|
|||
for ( int i = 0; i < num_fields; ++i )
|
||||
delete fields[i];
|
||||
|
||||
free(fields);
|
||||
// Static cast this to void* to avoid a clang-tidy warning about converting from the
|
||||
// double-pointer to void*
|
||||
free(static_cast<void*>(fields));
|
||||
|
||||
Unref(path_val);
|
||||
Unref(config);
|
||||
|
@ -811,7 +813,9 @@ bool Manager::TraverseRecord(Stream* stream, Filter* filter, RecordType* rt, Tab
|
|||
// Alright, we want this field.
|
||||
filter->indices.push_back(new_indices);
|
||||
|
||||
void* tmp = realloc(filter->fields, sizeof(threading::Field*) * (filter->num_fields + 1));
|
||||
// Static cast this to void* to avoid a clang-tidy warning about converting from the
|
||||
// double-pointer to void*
|
||||
void* tmp = realloc(static_cast<void*>(filter->fields), sizeof(threading::Field*) * (filter->num_fields + 1));
|
||||
|
||||
if ( ! tmp ) {
|
||||
reporter->Error("out of memory in add_filter");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue