]> git.notmuchmail.org Git - notmuch/commitdiff
append _unused to the expression defined using unused() macro
authorTomi Ollila <tomi.ollila@iki.fi>
Thu, 30 May 2019 19:56:14 +0000 (22:56 +0300)
committerDavid Bremner <david@tethera.net>
Tue, 11 Jun 2019 10:25:04 +0000 (07:25 -0300)
This way if variables defined using unused() macro are actually
used then code will not compile...

- removed unused usage around one argc and one argv since those
  were used

- changed one unused (char *argv[]) to unused (char **argv) to
  work with modified unused() macro definition

notmuch-client.h
notmuch-setup.c
notmuch.c

index 39e26f2ec92aa3a2e4ef32516396491cc3184e9d..b3a501a9123ffdb08b74f8d9f3343ee6a38f644a 100644 (file)
@@ -53,7 +53,7 @@
 #include "talloc-extra.h"
 #include "crypto.h"
 
-#define unused(x) x __attribute__ ((unused))
+#define unused(x) x ## _unused __attribute__ ((unused))
 
 #define STRINGIFY(s) STRINGIFY_(s)
 #define STRINGIFY_(s) #s
index 5304800553cfbe3897e2c8774ba702a30b8b9488..81419ccf3a9426b56117e1eb44efbb642600d74e 100644 (file)
@@ -121,7 +121,7 @@ parse_tag_list (void *ctx, char *response)
 
 int
 notmuch_setup_command (notmuch_config_t *config,
-                      unused (int argc), unused (char *argv[]))
+                      int argc, char *argv[])
 {
     char *response = NULL;
     size_t response_size = 0;
index eeb794e85216115adaf8583744f51f382f8e5817..2ddc8fbcdb0b388b1c4b1dc9c6bd44387bf24321 100644 (file)
--- a/notmuch.c
+++ b/notmuch.c
@@ -358,7 +358,7 @@ notmuch_help_command (unused (notmuch_config_t * config), int argc, char *argv[]
  */
 static int
 notmuch_command (notmuch_config_t *config,
-                unused(int argc), unused(char *argv[]))
+                unused(int argc), unused(char **argv))
 {
     char *db_path;
     struct stat st;