Mesa (master): freedreno/decode: warnings cleanup

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jul 28 10:04:38 UTC 2020


Module: Mesa
Branch: master
Commit: 5125b4bc697e74147f4a6afe44aa508f12b2b6bd
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5125b4bc697e74147f4a6afe44aa508f12b2b6bd

Author: Rob Clark <robdclark at chromium.org>
Date:   Fri Jul 24 14:14:09 2020 -0700

freedreno/decode: warnings cleanup

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6070>

---

 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 <robclark at freedesktop.org>
  */
 
-#define _GNU_SOURCE
 #define LUA_COMPAT_APIINTCASTS
 
 #include <stdio.h>



More information about the mesa-commit mailing list