diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-12 14:19:31 +0100 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-04-20 04:44:24 +0000 |
commit | e70e8dd6a93e6680471536f613fa41824231d02c (patch) | |
tree | 1cdb0be89addafa815b84ca4e6f4861ecb77962d /src/gui/painting/qgrayraster.c | |
parent | 924b02aecbce4843ff9d0a7d1d15f1eb154f5d69 (diff) |
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 <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/painting/qgrayraster.c')
-rw-r--r-- | src/gui/painting/qgrayraster.c | 6 |
1 files changed, 1 insertions, 5 deletions
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 <stdlib.h> #include <stdio.h> - /* 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. */ |