Commit 23f05211 authored by Olaf Meeuwissen's avatar Olaf Meeuwissen

saned: fix [-Wunused-parameter] compiler warning

The `__sane_unused__` attribute has been moved from sanei_backend.h to
sanei.h to make it generally useful instead of limited to backends.
parent 0d527f66
......@@ -3181,7 +3181,7 @@ run_standalone (char *user)
static void
run_inetd (char *sock)
run_inetd (char __sane_unused__ *sock)
{
int fd = -1;
......
......@@ -92,6 +92,9 @@
/** @name Public macros and functions
* @{
*/
/** @def __sane_unused__
* Mark parameters as potentially unused.
*/
/** @def STRINGIFY(x)
* Turn parameter into string.
*/
......@@ -137,6 +140,14 @@
/* @} */
/* A few convenience macros: */
/** @hideinitializer */
#ifdef __GNUC__
#define __sane_unused__ __attribute__((unused))
#else
#define __sane_unused__
#endif
/** @hideinitializer */
#define NELEMS(a) ((int)(sizeof (a) / sizeof (a[0])))
......
......@@ -9,20 +9,6 @@
*/
/*
* Compiler related options
*/
/** Mark unused variables/parameters
*
* Tells the compiler a variable is unused, so the compiler doesn't spit a warning.
*/
#ifdef __GNUC__
#define __sane_unused__ __attribute__((unused))
#else
#define __sane_unused__
#endif
/** @name Compatibility macros
* @{
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment