HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60448 )
Change subject: src/lib/cbfs.c: Prepare for gcc-12 ......................................................................
src/lib/cbfs.c: Prepare for gcc-12
GCC-12 warns about comparisons between two operands of array type: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97573
it issue the following error: src/lib/cbfs.c:31:32: error: comparison between two arrays [-Werror=array-compare] 31 | if (_preram_cbfs_cache != _postram_cbfs_cache) | ^~ src/lib/cbfs.c:31:32: note: use '&_preram_cbfs_cache[0] != &_postram_cbfs_cache[0]' to compare the addresses
Change-Id: I8dab1c69abf236e6ae78ce0fd59aa3281f5ee771 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/lib/cbfs.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/60448/1
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c index 5bbbe6a..efe3ce4 100644 --- a/src/lib/cbfs.c +++ b/src/lib/cbfs.c @@ -28,7 +28,7 @@
static void switch_to_postram_cache(int unused) { - if (_preram_cbfs_cache != _postram_cbfs_cache) + if (&_preram_cbfs_cache[0] != &_postram_cbfs_cache[0]) mem_pool_init(&cbfs_cache, _postram_cbfs_cache, REGION_SIZE(postram_cbfs_cache), CONFIG_CBFS_CACHE_ALIGN); }