From: Bjørn Mork Date: Sun, 19 Jun 2022 13:59:27 +0000 (+0200) Subject: realtek: fix gcc-12 build with -Werror=array-compare X-Git-Tag: v23.05.0-rc1~3192 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d6eebaf99570aa6de0b10694fcb11ee8c0195d3c;p=openwrt%2Fstaging%2Fhauke.git realtek: fix gcc-12 build with -Werror=array-compare Removing this gcc-12 error: arch/mips/rtl838x/setup.c:64:30: error: comparison between two arrays [-Werror=array-compare] 64 | else if (__dtb_start != __dtb_end) Signed-off-by: Bjørn Mork --- diff --git a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c index 55419c7b0b..18c477eb0f 100644 --- a/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c +++ b/target/linux/realtek/files-5.10/arch/mips/rtl838x/setup.c @@ -61,7 +61,7 @@ void __init plat_mem_setup(void) if (fw_passed_dtb) /* UHI interface */ dtb = (void *)fw_passed_dtb; - else if (__dtb_start != __dtb_end) + else if (&__dtb_start[0] != &__dtb_end[0]) dtb = (void *)__dtb_start; else panic("no dtb found");