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.
merge-requests/1/head
Olaf Meeuwissen 2016-09-04 12:50:19 +09:00
rodzic 0d527f6659
commit 23f052113b
3 zmienionych plików z 12 dodań i 15 usunięć

Wyświetl plik

@ -3181,7 +3181,7 @@ run_standalone (char *user)
static void
run_inetd (char *sock)
run_inetd (char __sane_unused__ *sock)
{
int fd = -1;

Wyświetl plik

@ -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])))

Wyświetl plik

@ -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
* @{
*/