[Skiboot] [PATCH v3] Fix array-bound compilation warnings

Cédric Le Goater clg at kaod.org
Fri Feb 4 23:23:42 AEDT 2022


On 1/24/22 14:56, Abhishek Singh Tomar wrote:
> 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 at linux.ibm.com>

It might not be the definitive solution but it does remove all the warnings
we have been seeing lately.

Applied to master.

Thanks,

C.


More information about the Skiboot mailing list