freedreno/decode: warnings cleanup
authorRob Clark <robdclark@chromium.org>
Fri, 24 Jul 2020 21:14:09 +0000 (14:14 -0700)
committerMarge Bot <eric+marge@anholt.net>
Tue, 28 Jul 2020 09:45:08 +0000 (09:45 +0000)
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6070>

src/freedreno/decode/disasm-a2xx.c
src/freedreno/decode/script.c

index 314c9c1500b7daea4c62e3702e47f12746c6a594..622d00479a8e1cc71e791431192464d8da841d83 100644 (file)
@@ -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]);
        }
index a882dd25af60d3c2795d941a6a953e88dbce7de7..a15f5596638ea6b6480cf7732ed083381f64dfb4 100644 (file)
@@ -26,7 +26,6 @@
  *    Rob Clark <robclark@freedesktop.org>
  */
 
-#define _GNU_SOURCE
 #define LUA_COMPAT_APIINTCASTS
 
 #include <stdio.h>