Re: [PATCH 1/2] perf bench: Fix two numa NDEBUG warnings

From: Arnaldo Carvalho de Melo
Date: Sat Apr 30 2022 - 11:27:56 EST


Em Fri, Apr 29, 2022 at 06:58:22PM -0700, Ian Rogers escreveu:
> On Fri, Apr 29, 2022 at 2:21 AM Athira Rajeev
> <atrajeev@xxxxxxxxxxxxxxxxxx> wrote:
> >
> >
> >
> > > On 29-Apr-2022, at 1:59 AM, Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > >
> > > BUG_ON is a no-op if NDEBUG is defined, otherwise it is an assert.
> > > Compiling with NDEBUG yields:
> > >
> > > bench/numa.c: In function ‘bind_to_cpu’:
> > > bench/numa.c:314:1: error: control reaches end of non-void function [-Werror=return-type]
> > > 314 | }
> > > | ^
> > > bench/numa.c: In function ‘bind_to_node’:
> > > bench/numa.c:367:1: error: control reaches end of non-void function [-Werror=return-type]
> > > 367 | }
> > > | ^
> > >
> > > Add return statements to cover this case.
> >
> > Looks fine to me
> >
> > Reviewed-by: Athira Rajeev <atrajeev@xxxxxxxxxxxxxxxxxx>
> >
> > Thanks
> > Athira
>
> Thanks Athira :-) Arnaldo, could we get this in the 5th batch for 5.18
> to keep NDEBUG building? It looks like there is a missing build test
> for NDEBUG too.

Applied to perf/urgent.

Thanks,

- Arnaldo