diff options
author | Thomas Martitz <kugel@rockbox.org> | 2012-02-17 12:08:27 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2012-02-17 12:08:27 +0100 |
commit | af4f2157b8732243326a3b65f4cd8eb4104ea670 (patch) | |
tree | 73abc284b332f01829a61e34df54bd89b1ea5c93 | |
parent | 885ecf832703ecc28eeb2476451fea2e8e3fa43e (diff) | |
download | rockbox-af4f2157b8732243326a3b65f4cd8eb4104ea670.tar.gz rockbox-af4f2157b8732243326a3b65f4cd8eb4104ea670.zip |
Fix lua unused-variable warning by introducing UNUSED_ATTR.
Change-Id: If19393db123e89e58545c9e0736e6fa32fccb810
-rw-r--r-- | apps/plugins/lua/rocklib.c | 2 | ||||
-rw-r--r-- | firmware/include/gcc_extensions.h | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/apps/plugins/lua/rocklib.c b/apps/plugins/lua/rocklib.c index 5aadfd2210..d89f48fa39 100644 --- a/apps/plugins/lua/rocklib.c +++ b/apps/plugins/lua/rocklib.c | |||
@@ -185,7 +185,7 @@ static inline void rli_init(lua_State *L) | |||
185 | * ----------------------------- | 185 | * ----------------------------- |
186 | */ | 186 | */ |
187 | 187 | ||
188 | #define RB_WRAP(M) static int rock_##M(lua_State *L) | 188 | #define RB_WRAP(M) static int rock_##M(lua_State UNUSED_ATTR *L) |
189 | #define SIMPLE_VOID_WRAPPER(func) RB_WRAP(func) { (void)L; func(); return 0; } | 189 | #define SIMPLE_VOID_WRAPPER(func) RB_WRAP(func) { (void)L; func(); return 0; } |
190 | 190 | ||
191 | /* Helper function for opt_viewport */ | 191 | /* Helper function for opt_viewport */ |
diff --git a/firmware/include/gcc_extensions.h b/firmware/include/gcc_extensions.h index 2735d6e7b6..390e57d85f 100644 --- a/firmware/include/gcc_extensions.h +++ b/firmware/include/gcc_extensions.h | |||
@@ -66,4 +66,11 @@ | |||
66 | #define USED_ATTR | 66 | #define USED_ATTR |
67 | #endif | 67 | #endif |
68 | 68 | ||
69 | #if defined(__GNUC__) && (__GNUC__ >= 3) | ||
70 | #define UNUSED_ATTR __attribute__((unused)) | ||
71 | #else | ||
72 | #define UNUSED_ATTR | ||
73 | #endif | ||
74 | |||
75 | |||
69 | #endif /* _GCC_EXTENSIONS_H_ */ | 76 | #endif /* _GCC_EXTENSIONS_H_ */ |