From 413883ecf8f2e9e51ca2347ba471c72df351433b Mon Sep 17 00:00:00 2001 From: Uri Lublin Date: Tue, 9 Jul 2013 23:24:31 +0300 Subject: 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. --- server/tests/test_display_base.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit