diff options
author | Uri Lublin <uril@redhat.com> | 2013-07-09 23:24:31 +0300 |
---|---|---|
committer | Uri Lublin <uril@redhat.com> | 2013-07-16 23:37:28 +0300 |
commit | 413883ecf8f2e9e51ca2347ba471c72df351433b (patch) | |
tree | 0ecf78a221d03b2d61250ef57b3f9d0eec122106 /server/tests | |
parent | a89b1b5543e65f483764556eab17d70f20f72a84 (diff) | |
download | spice-413883ecf8f2e9e51ca2347ba471c72df351433b.tar.gz spice-413883ecf8f2e9e51ca2347ba471c72df351433b.tar.xz spice-413883ecf8f2e9e51ca2347ba471c72df351433b.zip |
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.
Diffstat (limited to 'server/tests')
-rw-r--r-- | server/tests/test_display_base.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/tests/test_display_base.c b/server/tests/test_display_base.c index d8ff8d1f..20c0e478 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); |