[PATCH 1/2] build: disable GCC string op warnings when unoptimized

David Marchand david.marchand at redhat.com
Mon Nov 2 15:42:58 CET 2026


On Tue, 20 Oct 2026 at 16:56, Stephen Hemminger
<stephen at networkplumber.org> wrote:
>
> Without optimization GCC produces warnings for unreachable code paths.
> They check memcpy() against the object size even on paths that are dead
> for the inlined arguments. This breaks debug builds of app/test
> with -Werror on lib/stack/rte_stack_pile.h,
> and has required local pragma workarounds elsewhere.
>
> Disable both warnings when optimization is 0. They stay enabled for
> optimized builds, where the analysis is flow-sensitive.
>
> Bugzilla ID: 2061
>
> Reported-by: Ali Alnubani <alialnu at nvidia.com>
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> Acked-by: Morten Brørup <mb at smartsharesystems.com>

Series applied, thanks.


-- 
David Marchand



More information about the dev mailing list