From e70e8dd6a93e6680471536f613fa41824231d02c Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Wed, 12 Apr 2017 14:19:31 +0100 Subject: qgrayraster: use a cast to void to mark a variable as unused Do not use a self-assignment, as that may trigger compiler warnings. Casting to void is also what Q_UNUSED is doing these days, but we can't use it here because qgrayraster.c does not include qglobal.h. Remove a 15-years old comment related to the self assignment. Found by clazy. Change-Id: I8cc92b7a1b0b5fb13824959740243e17606ec753 Reviewed-by: Thiago Macieira --- src/gui/painting/qgrayraster.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/gui/painting/qgrayraster.c') diff --git a/src/gui/painting/qgrayraster.c b/src/gui/painting/qgrayraster.c index dae1c06bec..4a135e25d8 100644 --- a/src/gui/painting/qgrayraster.c +++ b/src/gui/painting/qgrayraster.c @@ -167,11 +167,7 @@ #include #include - /* This macro is used to indicate that a function parameter is unused. */ - /* Its purpose is simply to reduce compiler warnings. Note also that */ - /* simply defining it as `(void)x' doesn't avoid warnings with certain */ - /* ANSI compilers (e.g. LCC). */ -#define QT_FT_UNUSED( x ) (x) = (x) +#define QT_FT_UNUSED( x ) (void) x /* Disable the tracing mechanism for simplicity -- developers can */ /* activate it easily by redefining these two macros. */ -- cgit v1.2.3