mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-12-22 09:24:54 +01:00
Add -Wextra and fix warnings.
When adding -Wextra we also add -Wno-ununsed-parameters since that function means well enough, but is really annoying in practice. So the warnings we fix here are basically all comparsions between signed and unsigned values.
This commit is contained in:
parent
067c547b23
commit
cc48812cb5
4 changed files with 9 additions and 7 deletions
4
Makefile
4
Makefile
|
@ -1,7 +1,7 @@
|
|||
PROGS=notmuch
|
||||
|
||||
CXXWARNINGS_FLAGS=-Wall
|
||||
CWARNINGS_FLAGS=$(CXX_WARNINGS_FLAGS)
|
||||
CXXWARNINGS_FLAGS=-Wall -Wextra -Wno-unused-parameter
|
||||
CWARNINGS_FLAGS=$(CXXWARNINGS_FLAGS)
|
||||
|
||||
CDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc`
|
||||
CXXDEPENDS_FLAGS=`pkg-config --cflags glib-2.0 talloc` `xapian-config --cxxflags`
|
||||
|
|
|
@ -162,7 +162,7 @@ copy_header_unfolding (header_value_closure_t *value,
|
|||
chunk++;
|
||||
|
||||
if (value->len + 1 + strlen (chunk) + 1 > value->size) {
|
||||
int new_size = value->size;
|
||||
unsigned int new_size = value->size;
|
||||
if (value->size == 0)
|
||||
new_size = strlen (chunk) + 1;
|
||||
else
|
||||
|
|
|
@ -755,7 +755,8 @@ restore_command (int argc, char *argv[])
|
|||
FILE *input;
|
||||
notmuch_database_t *notmuch = NULL;
|
||||
char *line = NULL;
|
||||
size_t line_size, line_len;
|
||||
size_t line_size;
|
||||
ssize_t line_len;
|
||||
regex_t regex;
|
||||
int rerr;
|
||||
int ret = 0;
|
||||
|
@ -893,7 +894,7 @@ void
|
|||
usage (void)
|
||||
{
|
||||
command_t *command;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
fprintf (stderr, "Usage: notmuch <command> [args...]\n");
|
||||
fprintf (stderr, "\n");
|
||||
|
@ -911,7 +912,7 @@ int
|
|||
main (int argc, char *argv[])
|
||||
{
|
||||
command_t *command;
|
||||
int i;
|
||||
unsigned int i;
|
||||
|
||||
if (argc == 1)
|
||||
return setup_command (0, NULL);
|
||||
|
|
3
xutil.c
3
xutil.c
|
@ -113,7 +113,8 @@ int
|
|||
xregexec (const regex_t *preg, const char *string,
|
||||
size_t nmatch, regmatch_t pmatch[], int eflags)
|
||||
{
|
||||
int i, rerr;
|
||||
unsigned int i;
|
||||
int rerr;
|
||||
|
||||
rerr = regexec (preg, string, nmatch, pmatch, eflags);
|
||||
if (rerr)
|
||||
|
|
Loading…
Reference in a new issue