From 9bd3a854e669ad4e1256d4feb3ace4d316ae2d99 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 17 Sep 2024 14:19:08 -0400 Subject: [PATCH] asahi/decode: fix ptr casts ../src/asahi/lib/decode.c:933:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 933 | (void *)c->vertex_attachments; | ^ ../src/asahi/lib/decode.c:941:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] 941 | (void *)c->fragment_attachments; Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asahi/lib/decode.c b/src/asahi/lib/decode.c index a09900f8e76..76941e12cea 100644 --- a/src/asahi/lib/decode.c +++ b/src/asahi/lib/decode.c @@ -910,7 +910,7 @@ agxdecode_drm_cmd_render(struct agxdecode_ctx *ctx, DUMP_FIELD(c, "%d", vertex_attachment_count); struct drm_asahi_attachment *vertex_attachments = - (void *)c->vertex_attachments; + (void *)(uintptr_t)c->vertex_attachments; for (unsigned i = 0; i < c->vertex_attachment_count; i++) { DUMP_FIELD((&vertex_attachments[i]), "0x%x", order); DUMP_FIELD((&vertex_attachments[i]), "0x%llx", size); @@ -918,7 +918,7 @@ agxdecode_drm_cmd_render(struct agxdecode_ctx *ctx, } DUMP_FIELD(c, "%d", fragment_attachment_count); struct drm_asahi_attachment *fragment_attachments = - (void *)c->fragment_attachments; + (void *)(uintptr_t)c->fragment_attachments; for (unsigned i = 0; i < c->fragment_attachment_count; i++) { DUMP_FIELD((&fragment_attachments[i]), "0x%x", order); DUMP_FIELD((&fragment_attachments[i]), "0x%llx", size);