Fix GCC warning about unused value

Casting to void should shut up GCC about

error: statement has no effect [-Werror=unused-value]

static_cast<void>() is possible for all current types. Supposedly an old
C style cast could also be used, but they should not be used in modern
C++ code.
This commit is contained in:
Vasily
2018-12-27 13:09:17 +01:00
parent 9a2c388a1c
commit f32c91fe03
2 changed files with 4 additions and 2 deletions
@@ -1,7 +1,8 @@
#include "AudioManagerDummy.h"
// Used to get the compiler to shut up about C4100: unreferenced formal parameter.
#define UNREFERENCED_PARAMETER(P) (P)
// The cast is to get GCC to shut up about it.
#define UNREFERENCED_PARAMETER(P) static_cast<void>((P))
// application namespace
namespace advsettings {
@@ -1,7 +1,8 @@
#include "KeyboardInputDummy.h"
// Used to get the compiler to shut up about C4100: unreferenced formal parameter.
#define UNREFERENCED_PARAMETER(P) (P)
// The cast is to get GCC to shut up about it.
#define UNREFERENCED_PARAMETER(P) static_cast<void>((P))
namespace advsettings {