From: Lars Op den Kamp Date: Mon, 25 Jun 2012 09:18:58 +0000 (+0200) Subject: fixed unused var warning X-Git-Tag: upstream/2.2.0~1^2~22^2^2~13 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=7c6e999baf490279a0721899719dfa37902748d0;p=deb_libcec.git fixed unused var warning --- 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