[SeaBIOS] [PATCH] disable array bounds warning

Gerd Hoffmann posted 1 patch 1 year, 5 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/seabios tags/patchew/20230505070745.368915-1-kraxel@redhat.com
Makefile | 1 +
1 file changed, 1 insertion(+)
[SeaBIOS] [PATCH] disable array bounds warning
Posted by Gerd Hoffmann 1 year, 5 months ago
The segmented pointer casting magic confuses gcc, recent versions
throw array bound warnings.  Disable the warning.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile b/Makefile
index c108f87de768..d3341870a760 100644
--- a/Makefile
+++ b/Makefile
@@ -71,6 +71,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
 COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,)
+COMMONCFLAGS += $(call cc-option,$(CC),-Wno-array-bounds,)
 COMMONCFLAGS += $(call cc-option,$(CC),-fcf-protection=none,)
 COMMA := ,
 
-- 
2.40.1

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] disable array bounds warning
Posted by Kevin O'Connor 1 year, 5 months ago
On Fri, May 05, 2023 at 09:07:45AM +0200, Gerd Hoffmann wrote:
> The segmented pointer casting magic confuses gcc, recent versions
> throw array bound warnings.  Disable the warning.

Thanks.  I agree.

-Kevin

> 
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  Makefile | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Makefile b/Makefile
> index c108f87de768..d3341870a760 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -71,6 +71,7 @@ COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fno-stack-protector-all,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fstack-check=no,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-Wno-address-of-packed-member,)
> +COMMONCFLAGS += $(call cc-option,$(CC),-Wno-array-bounds,)
>  COMMONCFLAGS += $(call cc-option,$(CC),-fcf-protection=none,)
>  COMMA := ,
>  
> -- 
> 2.40.1
> 
> _______________________________________________
> SeaBIOS mailing list -- seabios@seabios.org
> To unsubscribe send an email to seabios-leave@seabios.org
_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org
[SeaBIOS] Re: [PATCH] disable array bounds warning
Posted by Gerd Hoffmann 1 year, 4 months ago
On Tue, May 09, 2023 at 06:54:21PM -0400, Kevin O'Connor wrote:
> 
> On Fri, May 05, 2023 at 09:07:45AM +0200, Gerd Hoffmann wrote:
> > The segmented pointer casting magic confuses gcc, recent versions
> > throw array bound warnings.  Disable the warning.
> 
> Thanks.  I agree.

Patch pushed.

take care,
  Gerd

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-leave@seabios.org