aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--notmuch-private.h2
-rw-r--r--notmuch.c8
3 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3a8cda90..6e3ab26d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
PROGS=notmuch
-CXXWARNINGS_FLAGS=-Wall -Wextra -Wno-unused-parameter
+CXXWARNINGS_FLAGS=-Wall -Wextra
CWARNINGS_FLAGS=$(CXXWARNINGS_FLAGS)
CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc`
diff --git a/notmuch-private.h b/notmuch-private.h
index be1fb63f..aac67b2e 100644
--- a/notmuch-private.h
+++ b/notmuch-private.h
@@ -72,6 +72,8 @@ _internal_error (const char *format, ...) PRINTF_ATTRIBUTE (1, 2);
_internal_error (format " (%s).\n", \
##__VA_ARGS__, __location__)
+#define unused(x) x __attribute__ ((unused))
+
/* Thanks to Andrew Tridgell's (SAMBA's) talloc for this definition of
* unlikely. The talloc source code comes to us via the GNU LGPL v. 3.
*/
diff --git a/notmuch.c b/notmuch.c
index 10782d4d..d98935bd 100644
--- a/notmuch.c
+++ b/notmuch.c
@@ -43,6 +43,8 @@
#include <glib.h> /* g_strdup_printf */
+#define unused(x) x __attribute__ ((unused))
+
/* There's no point in continuing when we've detected that we've done
* something wrong internally (as opposed to the user passing in a
* bogus value).
@@ -399,7 +401,7 @@ count_files (const char *path, int *count)
}
int
-setup_command (int argc, char *argv[])
+setup_command (unused (int argc), unused (char *argv[]))
{
notmuch_database_t *notmuch = NULL;
char *default_path, *mail_directory = NULL;
@@ -525,7 +527,7 @@ setup_command (int argc, char *argv[])
}
int
-new_command (int argc, char *argv[])
+new_command (unused (int argc), unused (char *argv[]))
{
notmuch_database_t *notmuch;
const char *mail_directory;
@@ -667,7 +669,7 @@ search_command (int argc, char *argv[])
}
int
-show_command (int argc, char *argv[])
+show_command (unused (int argc), unused (char *argv[]))
{
fprintf (stderr, "Error: show is not implemented yet.\n");
return 1;