lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <FDBE8FEC-CC4B-43C2-B2AA-3ECCFF95A98E@linux.vnet.ibm.com>
Date:   Fri, 29 Apr 2022 14:51:25 +0530
From:   Athira Rajeev <atrajeev@...ux.vnet.ibm.com>
To:     Ian Rogers <irogers@...gle.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Jin Yao <yao.jin@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf bench: Fix two numa NDEBUG warnings



> On 29-Apr-2022, at 1:59 AM, Ian Rogers <irogers@...gle.com> 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@...ux.vnet.ibm.com>

Thanks
Athira
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
> tools/perf/bench/numa.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/tools/perf/bench/numa.c b/tools/perf/bench/numa.c
> index 44e1f8a44087..d5289fa58a4f 100644
> --- a/tools/perf/bench/numa.c
> +++ b/tools/perf/bench/numa.c
> @@ -311,6 +311,7 @@ static cpu_set_t *bind_to_cpu(int target_cpu)
> 
> 	/* BUG_ON due to failure in allocation of orig_mask/mask */
> 	BUG_ON(-1);
> +	return NULL;
> }
> 
> static cpu_set_t *bind_to_node(int target_node)
> @@ -364,6 +365,7 @@ static cpu_set_t *bind_to_node(int target_node)
> 
> 	/* BUG_ON due to failure in allocation of orig_mask/mask */
> 	BUG_ON(-1);
> +	return NULL;
> }
> 
> static void bind_to_cpumask(cpu_set_t *mask)
> -- 
> 2.36.0.464.gb9c8b46e94-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ