kopia lustrzana https://gitlab.com/sane-project/backends
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
rodzic
0d527f6659
commit
23f052113b
|
@ -3181,7 +3181,7 @@ run_standalone (char *user)
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
run_inetd (char *sock)
|
run_inetd (char __sane_unused__ *sock)
|
||||||
{
|
{
|
||||||
|
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
|
|
|
@ -92,6 +92,9 @@
|
||||||
/** @name Public macros and functions
|
/** @name Public macros and functions
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
/** @def __sane_unused__
|
||||||
|
* Mark parameters as potentially unused.
|
||||||
|
*/
|
||||||
/** @def STRINGIFY(x)
|
/** @def STRINGIFY(x)
|
||||||
* Turn parameter into string.
|
* Turn parameter into string.
|
||||||
*/
|
*/
|
||||||
|
@ -137,6 +140,14 @@
|
||||||
/* @} */
|
/* @} */
|
||||||
|
|
||||||
/* A few convenience macros: */
|
/* A few convenience macros: */
|
||||||
|
|
||||||
|
/** @hideinitializer */
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#define __sane_unused__ __attribute__((unused))
|
||||||
|
#else
|
||||||
|
#define __sane_unused__
|
||||||
|
#endif
|
||||||
|
|
||||||
/** @hideinitializer */
|
/** @hideinitializer */
|
||||||
#define NELEMS(a) ((int)(sizeof (a) / sizeof (a[0])))
|
#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
|
/** @name Compatibility macros
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
Ładowanie…
Reference in New Issue