summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUri Lublin <uril@redhat.com>2013-07-09 23:24:31 +0300
committerUri Lublin <uril@redhat.com>2013-07-16 23:37:28 +0300
commit413883ecf8f2e9e51ca2347ba471c72df351433b (patch)
tree0ecf78a221d03b2d61250ef57b3f9d0eec122106
parenta89b1b5543e65f483764556eab17d70f20f72a84 (diff)
downloadspice-413883ecf8f2e9e51ca2347ba471c72df351433b.zip
spice-413883ecf8f2e9e51ca2347ba471c72df351433b.tar.gz
spice-413883ecf8f2e9e51ca2347ba471c72df351433b.tar.xz
syntax-check: fix cast_of_argument_to_free
In this case, make syntax-check is wrong, and we actually do need the cast. A cast is needed when types are uint64_t <--> pointer Using a local "ptr" variable makes both gcc and syntax-check happy.
-rw-r--r--server/tests/test_display_base.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c
index d8ff8d1..20c0e47 100644
--- a/server/tests/test_display_base.c
+++ b/server/tests/test_display_base.c
@@ -42,7 +42,8 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
return;
}
if (update->drawable.clip.type != SPICE_CLIP_TYPE_NONE) {
- free((uint8_t*)update->drawable.clip.data);
+ uint8_t *ptr = (uint8_t*)update->drawable.clip.data;
+ free(ptr);
}
free(update->bitmap);
free(update);