From: Rob Clark Date: Fri, 24 Jul 2020 21:14:09 +0000 (-0700) Subject: freedreno/decode: warnings cleanup X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5125b4bc697e74147f4a6afe44aa508f12b2b6bd;p=mesa.git freedreno/decode: warnings cleanup Signed-off-by: Rob Clark Part-of: --- 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