From a9bc782c843250a17255236acc210fbbe16ddf78 Mon Sep 17 00:00:00 2001 From: Abhishek Singh Tomar Date: Mon, 24 Jan 2022 19:26:12 +0530 Subject: Fix array-bound compilation warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves : the warray bounds warning during compilation /build/libc/include/string.h:34:16: warning: '__builtin_memset' offset [0, 2097151] is out of the bounds [0, 0] [-Warray-bounds] 34 | #define memset __builtin_memset hw/fsp/fsp.c:1855:9: note: in expansion of macro 'memset' 1855 | memset(fsp_tce_table, 0, PSI_TCE_TABLE_SIZE); use volatile pointer to avoid optimization introduced with gcc-11 on constant address assignment to pointer. Signed-off-by: Abhishek Singh Tomar Signed-off-by: Cédric Le Goater --- hdata/spira.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hdata/spira.h') diff --git a/hdata/spira.h b/hdata/spira.h index 8def23b..c0eb2a0 100644 --- a/hdata/spira.h +++ b/hdata/spira.h @@ -150,7 +150,7 @@ struct spiras { u8 reserved[0x180]; } __packed __align(0x100); -extern struct spiras *spiras; +extern struct spiras *skiboot_constant_addr spiras; /* This macro can be used to check the validity of a pointer returned -- cgit v1.1