From 7c6e999baf490279a0721899719dfa37902748d0 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Mon, 25 Jun 2012 11:18:58 +0200 Subject: [PATCH] fixed unused var warning --- include/cectypes.h | 9 --------- src/lib/platform/os.h | 10 ++++++++++ src/lib/platform/threads/mutex.h | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/cectypes.h b/include/cectypes.h index df59193..c5da11f 100644 --- a/include/cectypes.h +++ b/include/cectypes.h @@ -1348,15 +1348,6 @@ typedef struct libcec_configuration #endif } libcec_configuration; -#ifdef UNUSED -#elif defined(__GNUC__) -#define UNUSED(x) UNUSED_ ## x __attribute__((unused)) -#elif defined(__LCLINT__) -#define UNUSED(x) /*@unused@*/ x -#else -#define UNUSED(x) x -#endif - #ifdef __cplusplus }; }; diff --git a/src/lib/platform/os.h b/src/lib/platform/os.h index 4913d7b..60e02d6 100644 --- a/src/lib/platform/os.h +++ b/src/lib/platform/os.h @@ -31,6 +31,16 @@ * http://www.pulse-eight.net/ */ + +#ifdef UNUSED +#elif defined(__GNUC__) +#define UNUSED(x) UNUSED_ ## x __attribute__((unused)) +#elif defined(__LCLINT__) +#define UNUSED(x) /*@unused@*/ x +#else +#define UNUSED(x) x +#endif + #if (defined(_WIN32) || defined(_WIN64)) #include "windows/os-types.h" #else diff --git a/src/lib/platform/threads/mutex.h b/src/lib/platform/threads/mutex.h index cf35215..6fc57d1 100644 --- a/src/lib/platform/threads/mutex.h +++ b/src/lib/platform/threads/mutex.h @@ -51,7 +51,7 @@ namespace PLATFORM private: inline PreventCopy(const PreventCopy &c) { *this = c; } - inline PreventCopy &operator=(const PreventCopy &c){ return *this; } + inline PreventCopy &operator=(const PreventCopy & UNUSED(c)){ return *this; } }; template -- 2.34.1