mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-07 21:03:10 +00:00
tests: Avoid cast from integer of wrong size
These cast causes warnings if a 32 bit target is used. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
ddf3b836bb
commit
e26cbdb175
@ -225,7 +225,7 @@ static void end_replay(void)
|
||||
|
||||
static void release_resource(QXLInstance *qin, struct QXLReleaseInfoExt release_info)
|
||||
{
|
||||
spice_replay_free_cmd(replay, (QXLCommandExt *)release_info.info->id);
|
||||
spice_replay_free_cmd(replay, (QXLCommandExt *)(uintptr_t)release_info.info->id);
|
||||
}
|
||||
|
||||
static int get_cursor_command(QXLInstance *qin, struct QXLCommandExt *ext)
|
||||
|
||||
@ -64,7 +64,7 @@ static void test_spice_destroy_update(SimpleSpiceUpdate *update)
|
||||
return;
|
||||
}
|
||||
if (update->drawable.clip.type != SPICE_CLIP_TYPE_NONE) {
|
||||
uint8_t *ptr = (uint8_t*)update->drawable.clip.data;
|
||||
uint8_t *ptr = (uint8_t*)(uintptr_t)update->drawable.clip.data;
|
||||
g_free(ptr);
|
||||
}
|
||||
g_free(update->bitmap);
|
||||
@ -401,7 +401,7 @@ static void create_primary_surface(Test *test, uint32_t width,
|
||||
surface.flags = 0;
|
||||
surface.type = 0; /* unused by red_worker */
|
||||
surface.position = 0; /* unused by red_worker */
|
||||
surface.mem = (uint64_t)&test->primary_surface;
|
||||
surface.mem = (uintptr_t)&test->primary_surface;
|
||||
surface.group_id = MEM_SLOT_GROUP_ID;
|
||||
|
||||
test->width = width;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user