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.
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`
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
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;
usage (void)
{
command_t *command;
- int i;
+ unsigned int i;
fprintf (stderr, "Usage: notmuch <command> [args...]\n");
fprintf (stderr, "\n");
main (int argc, char *argv[])
{
command_t *command;
- int i;
+ unsigned int i;
if (argc == 1)
return setup_command (0, NULL);
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)