mirror of
https://git.notmuchmail.org/git/notmuch
synced 2025-01-18 09:15:56 +01:00
Re-enable the warning for unused parameters.
It's easy enough to squelch the warning with an __attribute__ ((unused)) and it might just catch something for us in the future.
This commit is contained in:
parent
cc48812cb5
commit
884ac59256
3 changed files with 8 additions and 4 deletions
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
||||||
PROGS=notmuch
|
PROGS=notmuch
|
||||||
|
|
||||||
CXXWARNINGS_FLAGS=-Wall -Wextra -Wno-unused-parameter
|
CXXWARNINGS_FLAGS=-Wall -Wextra
|
||||||
CWARNINGS_FLAGS=$(CXXWARNINGS_FLAGS)
|
CWARNINGS_FLAGS=$(CXXWARNINGS_FLAGS)
|
||||||
|
|
||||||
CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc`
|
CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc`
|
||||||
|
|
|
@ -72,6 +72,8 @@ _internal_error (const char *format, ...) PRINTF_ATTRIBUTE (1, 2);
|
||||||
_internal_error (format " (%s).\n", \
|
_internal_error (format " (%s).\n", \
|
||||||
##__VA_ARGS__, __location__)
|
##__VA_ARGS__, __location__)
|
||||||
|
|
||||||
|
#define unused(x) x __attribute__ ((unused))
|
||||||
|
|
||||||
/* Thanks to Andrew Tridgell's (SAMBA's) talloc for this definition of
|
/* 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.
|
* unlikely. The talloc source code comes to us via the GNU LGPL v. 3.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
#include <glib.h> /* g_strdup_printf */
|
#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
|
/* 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
|
* something wrong internally (as opposed to the user passing in a
|
||||||
* bogus value).
|
* bogus value).
|
||||||
|
@ -399,7 +401,7 @@ count_files (const char *path, int *count)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
setup_command (int argc, char *argv[])
|
setup_command (unused (int argc), unused (char *argv[]))
|
||||||
{
|
{
|
||||||
notmuch_database_t *notmuch = NULL;
|
notmuch_database_t *notmuch = NULL;
|
||||||
char *default_path, *mail_directory = NULL;
|
char *default_path, *mail_directory = NULL;
|
||||||
|
@ -525,7 +527,7 @@ setup_command (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
new_command (int argc, char *argv[])
|
new_command (unused (int argc), unused (char *argv[]))
|
||||||
{
|
{
|
||||||
notmuch_database_t *notmuch;
|
notmuch_database_t *notmuch;
|
||||||
const char *mail_directory;
|
const char *mail_directory;
|
||||||
|
@ -667,7 +669,7 @@ search_command (int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
show_command (int argc, char *argv[])
|
show_command (unused (int argc), unused (char *argv[]))
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Error: show is not implemented yet.\n");
|
fprintf (stderr, "Error: show is not implemented yet.\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue