diff mbox series

[1/3] rt-tests: Turn off -Wunused-parameter

Message ID 20250107220229.156201-2-crwood@redhat.com
State New
Headers show
Series rt-tests: -Wno-unused-parameter and -Werror | expand

Commit Message

Crystal Wood Jan. 7, 2025, 10:02 p.m. UTC
-Wunused-parameter (part of -Wextra) is an obnoxious warning as it flags
perfectly reasonable code that takes unneeded parameters in order to
comply with a function pointer interface, or where the parameter is used
only by code inside an ifdef, etc.  This results in numerous annotations
just to shut the compiler up, all for a warning that has relatively
little value even in cases where it's not a false positive (where it's
just an indication that cleanup is warranted).

Signed-off-by: Crystal Wood <crwood@redhat.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

John Kacur Jan. 14, 2025, 10:38 p.m. UTC | #1
On Tue, 7 Jan 2025, Crystal Wood wrote:

> -Wunused-parameter (part of -Wextra) is an obnoxious warning as it flags
> perfectly reasonable code that takes unneeded parameters in order to
> comply with a function pointer interface, or where the parameter is used
> only by code inside an ifdef, etc.  This results in numerous annotations
> just to shut the compiler up, all for a warning that has relatively
> little value even in cases where it's not a false positive (where it's
> just an indication that cleanup is warranted).
> 
> Signed-off-by: Crystal Wood <crwood@redhat.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 0fa0928..dda29c3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -33,7 +33,7 @@ prefix  ?= /usr/local
>  bindir  ?= $(prefix)/bin
>  mandir	?= $(prefix)/share/man
>  
> -CFLAGS ?= -Wall -Wno-nonnull -Wextra -Wno-sign-compare
> +CFLAGS ?= -Wall -Wno-nonnull -Wextra -Wno-sign-compare -Wno-unused-parameter
>  CPPFLAGS += -D_GNU_SOURCE -Isrc/include
>  LDFLAGS ?=
>  
> -- 
> 2.47.1
> 
> 
> 
Signed-off-by: John Kacur <jkacur@gmail.com>
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 0fa0928..dda29c3 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@  prefix  ?= /usr/local
 bindir  ?= $(prefix)/bin
 mandir	?= $(prefix)/share/man
 
-CFLAGS ?= -Wall -Wno-nonnull -Wextra -Wno-sign-compare
+CFLAGS ?= -Wall -Wno-nonnull -Wextra -Wno-sign-compare -Wno-unused-parameter
 CPPFLAGS += -D_GNU_SOURCE -Isrc/include
 LDFLAGS ?=