diff options
author | Abhishek Singh Tomar <abhishek@linux.ibm.com> | 2022-01-24 19:26:12 +0530 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2022-02-04 08:35:25 +0100 |
commit | a9bc782c843250a17255236acc210fbbe16ddf78 (patch) | |
tree | a1e47431d10c638dea932bc3574d38f4365e482e /hdata/spira.c | |
parent | 095cef27f0f4aad58266516846e65363418cf7f1 (diff) | |
download | skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.zip skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.tar.gz skiboot-a9bc782c843250a17255236acc210fbbe16ddf78.tar.bz2 |
Fix array-bound compilation warnings
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 <abhishek@linux.ibm.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hdata/spira.c')
-rw-r--r-- | hdata/spira.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hdata/spira.c b/hdata/spira.c index 1a35146..fbb14b0 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -236,7 +236,7 @@ __section(".spirah.data") struct spirah spirah = { }; /* The service processor SPIRA-S structure */ -struct spiras *spiras; +struct spiras *skiboot_constant_addr spiras; /* Overridden for testing. */ #ifndef spira_check_ptr |