[Spice-commits] server/tests
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Aug 22 20:29:21 UTC 2019
server/tests/test-loop.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit a9d53f3cd13830bba045c0f8007079fdadd89e93
Author: Uri Lublin <uril at redhat.com>
Date: Thu Aug 22 18:53:12 2019 +0300
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 at redhat.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/server/tests/test-loop.c b/server/tests/test-loop.c
index 82af80ab..4df3a7d2 100644
--- a/server/tests/test-loop.c
+++ b/server/tests/test-loop.c
@@ -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]);
More information about the Spice-commits
mailing list