mirror of
https://github.com/zeek/zeek.git
synced 2025-10-12 03:28:19 +00:00
Fix clang-tidy readability-isolate-declaration warnings
I missed one of these in review so a machine is probably better at catching them. I fixed the existing instances which where largely in code which look dated. Where possible I slightly reorganized the code so we do not have to leave values uninitialized, but did not touch up anything else.
This commit is contained in:
parent
c725311d07
commit
627c3ad726
32 changed files with 142 additions and 81 deletions
|
@ -480,7 +480,10 @@ void ZAMCompiler::ComputeFrameLifetimes() {
|
|||
break;
|
||||
}
|
||||
|
||||
int s1, s2, s3, s4;
|
||||
int s1;
|
||||
int s2;
|
||||
int s3;
|
||||
int s4;
|
||||
|
||||
if ( ! inst->UsesSlots(s1, s2, s3, s4) )
|
||||
continue;
|
||||
|
|
|
@ -385,7 +385,8 @@ void ZAMCompiler::Dump() {
|
|||
|
||||
for ( auto i = 0U; i < insts2.size(); ++i ) {
|
||||
auto& inst = insts2[i];
|
||||
std::string liveness, depth;
|
||||
std::string liveness;
|
||||
std::string depth;
|
||||
|
||||
if ( inst->live )
|
||||
liveness = util::fmt("(labels %d)", inst->num_labels);
|
||||
|
@ -460,7 +461,8 @@ void ZAMCompiler::DumpInsts1(const FrameReMap* remappings) {
|
|||
// we need to concretize the branch slots
|
||||
ConcretizeBranch(inst, inst->target, inst->target_slot);
|
||||
|
||||
std::string liveness, depth;
|
||||
std::string liveness;
|
||||
std::string depth;
|
||||
|
||||
if ( inst->live )
|
||||
liveness = util::fmt("(labels %d)", inst->num_labels);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue