Skip to content

Commit

Permalink
Avoid warning due to unused variable when profiling is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
plusvic committed Jun 18, 2015
1 parent a96846f commit a7a2319
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libyara/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ int yr_execute_code(
STACK_ITEM r2;
STACK_ITEM r3;

#ifdef PROFILING_ENABLED
YR_RULE* current_rule = NULL;
#endif

YR_RULE* rule;
YR_MATCH* match;
YR_OBJECT_FUNCTION* function;
Expand Down Expand Up @@ -401,7 +404,9 @@ int yr_execute_code(
break;

case OP_INIT_RULE:
#ifdef PROFILING_ENABLED
current_rule = *(YR_RULE**)(ip + 1);
#endif
ip += sizeof(uint64_t);
break;

Expand Down

0 comments on commit a7a2319

Please sign in to comment.