append _unused to the expression defined using unused() macro

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
This commit is contained in:
Tomi Ollila 2019-05-30 22:56:14 +03:00 committed by David Bremner
parent eea09ee153
commit 38dacf009c
3 changed files with 3 additions and 3 deletions

View file

@ -53,7 +53,7 @@
#include "talloc-extra.h" #include "talloc-extra.h"
#include "crypto.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) STRINGIFY_(s)
#define STRINGIFY_(s) #s #define STRINGIFY_(s) #s

View file

@ -121,7 +121,7 @@ parse_tag_list (void *ctx, char *response)
int int
notmuch_setup_command (notmuch_config_t *config, notmuch_setup_command (notmuch_config_t *config,
unused (int argc), unused (char *argv[])) int argc, char *argv[])
{ {
char *response = NULL; char *response = NULL;
size_t response_size = 0; size_t response_size = 0;

View file

@ -358,7 +358,7 @@ notmuch_help_command (unused (notmuch_config_t * config), int argc, char *argv[]
*/ */
static int static int
notmuch_command (notmuch_config_t *config, notmuch_command (notmuch_config_t *config,
unused(int argc), unused(char *argv[])) unused(int argc), unused(char **argv))
{ {
char *db_path; char *db_path;
struct stat st; struct stat st;