mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Fix gcc compile warnings.
This commit is contained in:
parent
6d868d83be
commit
07cba950b8
4 changed files with 11 additions and 9 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit 0af74017e28d78179a25d60ca80385af444d39f1
|
Subproject commit 9def853ec4498e0133735938355832e0a7628ec8
|
|
@ -94,7 +94,7 @@ void EventHandler::Call(val_list* vl, bool no_remote)
|
||||||
msg.emplace_back(Name());
|
msg.emplace_back(Name());
|
||||||
bool valid_args = true;
|
bool valid_args = true;
|
||||||
|
|
||||||
for ( auto i = 0u; i < vl->length(); ++i )
|
for ( auto i = 0; i < vl->length(); ++i )
|
||||||
{
|
{
|
||||||
auto opt_data = comm::val_to_data((*vl)[i]);
|
auto opt_data = comm::val_to_data((*vl)[i]);
|
||||||
|
|
||||||
|
|
|
@ -192,7 +192,8 @@ struct val_converter {
|
||||||
|
|
||||||
auto expected_index_types = tt->Indices()->Types();
|
auto expected_index_types = tt->Indices()->Types();
|
||||||
|
|
||||||
if ( expected_index_types->length() != indices->size() )
|
if ( static_cast<size_t>(expected_index_types->length()) !=
|
||||||
|
indices->size() )
|
||||||
{
|
{
|
||||||
Unref(rval);
|
Unref(rval);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -244,7 +245,8 @@ struct val_converter {
|
||||||
|
|
||||||
auto expected_index_types = tt->Indices()->Types();
|
auto expected_index_types = tt->Indices()->Types();
|
||||||
|
|
||||||
if ( expected_index_types->length() != indices->size() )
|
if ( static_cast<size_t>(expected_index_types->length()) !=
|
||||||
|
indices->size() )
|
||||||
{
|
{
|
||||||
Unref(rval);
|
Unref(rval);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -315,7 +317,7 @@ struct val_converter {
|
||||||
|
|
||||||
auto rt = type->AsRecordType();
|
auto rt = type->AsRecordType();
|
||||||
|
|
||||||
if ( a.fields.size() != rt->NumFields() )
|
if ( a.fields.size() != static_cast<size_t>(rt->NumFields()) )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
auto rval = new RecordVal(rt);
|
auto rval = new RecordVal(rt);
|
||||||
|
@ -505,7 +507,7 @@ broker::util::optional<broker::data> comm::val_to_data(Val* v)
|
||||||
{
|
{
|
||||||
auto rec = v->AsRecordVal();
|
auto rec = v->AsRecordVal();
|
||||||
broker::record rval;
|
broker::record rval;
|
||||||
auto num_fields = v->Type()->AsRecordType()->NumFields();
|
size_t num_fields = v->Type()->AsRecordType()->NumFields();
|
||||||
rval.fields.reserve(num_fields);
|
rval.fields.reserve(num_fields);
|
||||||
|
|
||||||
for ( auto i = 0u; i < num_fields; ++i )
|
for ( auto i = 0u; i < num_fields; ++i )
|
||||||
|
|
|
@ -322,7 +322,7 @@ RecordVal* comm::Manager::MakeEventArgs(val_list* args)
|
||||||
rval->Assign(1, arg_vec);
|
rval->Assign(1, arg_vec);
|
||||||
Func* func;
|
Func* func;
|
||||||
|
|
||||||
for ( auto i = 0u; i < args->length(); ++i )
|
for ( auto i = 0; i < args->length(); ++i )
|
||||||
{
|
{
|
||||||
auto arg_val = (*args)[i];
|
auto arg_val = (*args)[i];
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ void comm::Manager::Process()
|
||||||
|
|
||||||
auto arg_types = ehp->FType()->ArgTypes()->Types();
|
auto arg_types = ehp->FType()->ArgTypes()->Types();
|
||||||
|
|
||||||
if ( arg_types->length() != em.size() - 1 )
|
if ( static_cast<size_t>(arg_types->length()) != em.size() - 1 )
|
||||||
{
|
{
|
||||||
reporter->Warning("got event message with invalid # of args,"
|
reporter->Warning("got event message with invalid # of args,"
|
||||||
" got %zd, expected %d", em.size() - 1,
|
" got %zd, expected %d", em.size() - 1,
|
||||||
|
@ -766,7 +766,7 @@ void comm::Manager::Process()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( vl->length() == em.size() - 1 )
|
if ( static_cast<size_t>(vl->length()) == em.size() - 1 )
|
||||||
mgr.QueueEvent(ehp, vl);
|
mgr.QueueEvent(ehp, vl);
|
||||||
else
|
else
|
||||||
delete_vals(vl);
|
delete_vals(vl);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue