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: <20250110190057.2294fd5a@pumpkin>
Date: Fri, 10 Jan 2025 19:00:57 +0000
From: David Laight <david.laight.linux@...il.com>
To: Muhammad Usama Anjum <usama.anjum@...labora.com>
Cc: Kees Cook <kees@...nel.org>, Andy Lutomirski <luto@...capital.net>, Will
 Drewry <wad@...omium.org>, Shuah Khan <shuah@...nel.org>, Andrew Morton
 <akpm@...ux-foundation.org>, Jérôme Glisse
 <jglisse@...hat.com>, linux-kselftest@...r.kernel.org,
 linux-kernel@...r.kernel.org, linux-mm@...ck.org, kernel@...labora.com
Subject: Re: [PATCH 01/16] selftests/mm: remove argc and argv unused
 parameters

On Thu,  9 Jan 2025 22:38:27 +0500
Muhammad Usama Anjum <usama.anjum@...labora.com> wrote:

> Remove the following warnings by removing unused argc and argv
> parameters:
> In function ‘main’:
>   warning: unused parameter ‘argc’ [-Wunused-parameter]
>     158 | int main(int argc, char *argv[])
>         |          ~~~~^~~~
>   warning: unused parameter ‘argv’ [-Wunused-parameter]
>     158 | int main(int argc, char *argv[])
...
> diff --git a/tools/testing/selftests/mm/compaction_test.c b/tools/testing/selftests/mm/compaction_test.c
> index 2c3a0eb6b22d3..8d23b698ce9db 100644
> --- a/tools/testing/selftests/mm/compaction_test.c
> +++ b/tools/testing/selftests/mm/compaction_test.c
> @@ -194,7 +194,7 @@ int set_zero_hugepages(unsigned long *initial_nr_hugepages)
>  	return ret;
>  }
>  
> -int main(int argc, char **argv)
> +int main(void)

Doesn't that generate a different warning because main() is a special function
and gcc knows the arguments it should have.

Just disable -Wunused-parameter - there are far too many places where it produces
unwanted warnings.

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ