mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix LGTM warnings in script_opt/CPP code
i.e. shadowed variables and "missing return values" (scare quotes)
This commit is contained in:
parent
ac257e4a86
commit
1b825c51de
3 changed files with 18 additions and 11 deletions
|
@ -219,12 +219,12 @@ string CPPCompile::BindArgs(const FuncTypePtr& ft, const IDPList* lambda_ids)
|
|||
for ( auto i = 0; i < n; ++i )
|
||||
{
|
||||
auto arg_i = string("f->GetElement(") + Fmt(i) + ")";
|
||||
const auto& ft = params->GetFieldType(i);
|
||||
const auto& pt = params->GetFieldType(i);
|
||||
|
||||
if ( IsNativeType(ft) )
|
||||
res += arg_i + NativeAccessor(ft);
|
||||
if ( IsNativeType(pt) )
|
||||
res += arg_i + NativeAccessor(pt);
|
||||
else
|
||||
res += GenericValPtrToGT(arg_i, ft, GEN_VAL_PTR);
|
||||
res += GenericValPtrToGT(arg_i, pt, GEN_VAL_PTR);
|
||||
|
||||
res += ", ";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue