mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-03 07:02:25 +00:00
test-loop: increment a variable outside of spice_assert
spice_assert is a macro and covscan reports that: Argument "++twice_remove_called" of spice_assert() has a side effect. Doesn't matter if there is a side effects or not, it's a good practice and it makes covscan happy, so increment the variable one line above. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
e9c8b25904
commit
a9d53f3cd1
@ -78,7 +78,8 @@ static SpiceTimer *twice_timers_remove[2] = { NULL, NULL };
|
||||
static int twice_remove_called = 0;
|
||||
static void timer_not_twice_remove(void *opaque)
|
||||
{
|
||||
spice_assert(++twice_remove_called == 1);
|
||||
++twice_remove_called;
|
||||
spice_assert(twice_remove_called == 1);
|
||||
|
||||
/* delete timers, should not have another call */
|
||||
core->timer_remove(twice_timers_remove[0]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user