summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/wolf/port/unused.h6
-rw-r--r--src/daemon/signals.c2
-rw-r--r--src/port/unused.h9
-rw-r--r--tests/daemon/testd.c4
4 files changed, 11 insertions, 10 deletions
diff --git a/include/wolf/port/unused.h b/include/wolf/port/unused.h
deleted file mode 100644
index d01d415..0000000
--- a/include/wolf/port/unused.h
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef WOLF_UNUSED_H
-#define WOLF_UNUSED_H
-
-#define UNUSED( x ) if( 0 && (x) ) { }
-
-#endif /* ifndef WOLF_UNUSED_H */
diff --git a/src/daemon/signals.c b/src/daemon/signals.c
index c5b4563..ccec882 100644
--- a/src/daemon/signals.c
+++ b/src/daemon/signals.c
@@ -182,7 +182,7 @@ install_ignore_again:
* forked children and waitpid.
*/
static void empty_handler( int sig ) {
- UNUSED( sig );
+ WOLF_UNUSED( sig );
}
static wolf_error_t vsignal_install_empty( int sig, va_list ap ) {
diff --git a/src/port/unused.h b/src/port/unused.h
new file mode 100644
index 0000000..c18ed27
--- /dev/null
+++ b/src/port/unused.h
@@ -0,0 +1,9 @@
+#ifndef WOLF_UNUSED_H
+#define WOLF_UNUSED_H
+
+/**
+ * @brief Macro to avoid unused parameter messages in functions
+ */
+#define WOLF_UNUSED( x ) if( 0 && (x) ) { }
+
+#endif /* ifndef WOLF_UNUSED_H */
diff --git a/tests/daemon/testd.c b/tests/daemon/testd.c
index 92dfc35..2a33471 100644
--- a/tests/daemon/testd.c
+++ b/tests/daemon/testd.c
@@ -9,8 +9,6 @@
#include "daemon/daemon.h" /* Unix daemonizing code */
#include "daemon/signals.h" /* signal supension */
-#include "port/unused.h"
-
#include "testd_cmdline.h" /* for command line and option parsing (gengetopt) */
#define DEFAULT_CONFIG_FILE "/etc/" CMDLINE_PARSER_PACKAGE ".conf"
@@ -27,7 +25,7 @@ static int parse_options_and_arguments( int argc, char *argv[], struct gengetopt
}
static int test_config( const char *filename ) {
- UNUSED( filename );
+ LOG( log_NOTICE, "Testing configuraton read from '%s'", filename );
return EXIT_SUCCESS;
}