forked from len0rd/rockbox
Fix lua unused-variable warning by introducing UNUSED_ATTR.
Change-Id: If19393db123e89e58545c9e0736e6fa32fccb810
This commit is contained in:
parent
885ecf8327
commit
af4f2157b8
2 changed files with 8 additions and 1 deletions
|
|
@ -185,7 +185,7 @@ static inline void rli_init(lua_State *L)
|
||||||
* -----------------------------
|
* -----------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define RB_WRAP(M) static int rock_##M(lua_State *L)
|
#define RB_WRAP(M) static int rock_##M(lua_State UNUSED_ATTR *L)
|
||||||
#define SIMPLE_VOID_WRAPPER(func) RB_WRAP(func) { (void)L; func(); return 0; }
|
#define SIMPLE_VOID_WRAPPER(func) RB_WRAP(func) { (void)L; func(); return 0; }
|
||||||
|
|
||||||
/* Helper function for opt_viewport */
|
/* Helper function for opt_viewport */
|
||||||
|
|
|
||||||
|
|
@ -66,4 +66,11 @@
|
||||||
#define USED_ATTR
|
#define USED_ATTR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && (__GNUC__ >= 3)
|
||||||
|
#define UNUSED_ATTR __attribute__((unused))
|
||||||
|
#else
|
||||||
|
#define UNUSED_ATTR
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* _GCC_EXTENSIONS_H_ */
|
#endif /* _GCC_EXTENSIONS_H_ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue