lkml.org 
[lkml]   [2023]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    SubjectRe: Calculating array sizes in C - was: Re: Build regressions/improvements in v6.2-rc1
    From
    Hello Adrian,
    > Could you post a kernel patch for that? I would be happy to test it on my
    > SH-7785CLR board. Also, I'm going to file a bug report against GCC.

    I filed the bug already. It's
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108483.

    The diff is attached. It's published as CC0 in case anyone considers
    this trivial change copyrightable. This patch prevents this one specific
    warning from being upgraded to "error" even if you configure the kernel
    to use "-Werror". It still keeps it active as warning, though.

    Kind regards,
      Michael Karcher
    diff --git a/Makefile b/Makefile
    index e09fe100efb2..b4cd075c6a19 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -870,7 +870,7 @@ stackp-flags-$(CONFIG_STACKPROTECTOR_STRONG) := -fstack-protector-strong

    KBUILD_CFLAGS += $(stackp-flags-y)

    -KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror
    +KBUILD_CPPFLAGS-$(CONFIG_WERROR) += -Werror -Wno-error=sizeof-pointer-div
    KBUILD_CPPFLAGS += $(KBUILD_CPPFLAGS-y)
    KBUILD_CFLAGS-$(CONFIG_CC_NO_ARRAY_BOUNDS) += -Wno-array-bounds
    \
     
     \ /
      Last update: 2023-03-26 23:49    [W:4.021 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site