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] [day] [month] [year] [list]
Message-ID: <20220824071630.foz2k6ycwdn5vsdw@wittgenstein>
Date:   Wed, 24 Aug 2022 09:16:30 +0200
From:   Christian Brauner <brauner@...nel.org>
To:     Andrew Delgadilo <adelg@...gle.com>
Cc:     Shuah Khan <shuah@...nel.org>, linux-kselftest@...r.kernel.org,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] selftests: remove unused variable in close_range test

On Tue, Aug 23, 2022 at 10:48:11PM +0000, Andrew Delgadilo wrote:
> From: Andrew Delgadillo <adelg@...gle.com>
> 
> commit 2c5db60e46ad ("tests: add close_range() tests") adds the
> close_range test under the core namespace. In its current form, the
> close_range test has an unused variable, namely, ret. For those building
> with -Werror,-Wall, this breaks the build.
> 
> Without this patch:
> $ make -C tools/testing/selftests/ TARGETS=core V=1 CFLAGS="-Werror -Wall"
> > make: Entering directory '/.../kernel-src/tools/testing/selftests'
> > make[1]: Entering directory '/.../kernel-src/tools/testing/selftests/core'
> > gcc -Werror -Wall    close_range_test.c  -o /.../kernel-src/tools/testing/selftests/core/close_range_test
> > close_range_test.c: In function 'core_close_range':
> > close_range_test.c:55:16: error: unused variable 'ret' [-Werror=unused-variable]
> >   55 |         int i, ret;
> >      |                ^~~
> > cc1: all warnings being treated as errors
> > make[1]: *** [../lib.mk:135: /.../kernel-src/tools/testing/selftests/core/close_range_test] Error 1
> > make[1]: Leaving directory '/.../kernel-src/tools/testing/selftests/core'
> > make: *** [Makefile:155: all] Error 2
> > make: Leaving directory '/.../kernel-src/tools/testing/selftests'
> 
> With this patch:
> $ make -C tools/testing/selftests/ TARGETS=core V=1 CFLAGS="-Werror -Wall"
> > make: Entering directory '/.../kernel-src/tools/testing/selftests'
> > make[1]: Entering directory '/.../kernel-src/tools/testing/selftests/core'
> > gcc -Werror -Wall    close_range_test.c  -o /.../kernel-src/tools/testing/selftests/core/close_range_test
> > make[1]: Leaving directory '/.../kernel-src/tools/testing/selftests/core'
> > make: Leaving directory '/.../kernel-src/tools/testing/selftests'
> 
> Fixes: 2c5db60e46ad ("tests: add close_range() tests")
> Cc: <stable@...r.kernel.org>
> Signed-off-by: Andrew Delgadillo <adelg@...gle.com>
> ---

Thanks,
Reviewed-by: Christian Brauner (Microsoft) <brauner@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ