From 5125b4bc697e74147f4a6afe44aa508f12b2b6bd Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 24 Jul 2020 14:14:09 -0700 Subject: [PATCH] freedreno/decode: warnings cleanup Signed-off-by: Rob Clark Part-of: --- src/freedreno/decode/disasm-a2xx.c | 3 ++- src/freedreno/decode/script.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedreno/decode/disasm-a2xx.c b/src/freedreno/decode/disasm-a2xx.c index 314c9c1500b..622d00479a8 100644 --- a/src/freedreno/decode/disasm-a2xx.c +++ b/src/freedreno/decode/disasm-a2xx.c @@ -560,7 +560,8 @@ static void print_cf(instr_cf_t *cf, int level) { printf("%s", levels[level]); if (debug & PRINT_RAW) { - uint16_t *words = (uint16_t *)cf; + uint16_t words[3]; + memcpy(&words, cf, sizeof(words)); printf(" %04x %04x %04x \t", words[0], words[1], words[2]); } diff --git a/src/freedreno/decode/script.c b/src/freedreno/decode/script.c index a882dd25af6..a15f5596638 100644 --- a/src/freedreno/decode/script.c +++ b/src/freedreno/decode/script.c @@ -26,7 +26,6 @@ * Rob Clark */ -#define _GNU_SOURCE #define LUA_COMPAT_APIINTCASTS #include -- 2.30.2