aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar David Edmondson <dme@dme.org>2011-12-20 15:20:04 +0000
committerGravatar David Bremner <bremner@debian.org>2011-12-21 07:32:16 -0400
commit77ec8108a10a8d372bed6298e22c89d7de651577 (patch)
tree82d815bde160591e647b5d19f26ae4ee519d7113
parente3260d025389c2e98dbda58cff1c214497813bc2 (diff)
notmuch: Quiet buildbot warnings.
Cast away the result of various *write functions. Provide a default value for some variables to avoid "use before set" warnings.
-rw-r--r--lib/database.cc2
-rw-r--r--notmuch-new.c2
-rw-r--r--notmuch-show.c2
-rw-r--r--notmuch-tag.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/lib/database.cc b/lib/database.cc
index 98f101e6..f1a9dc2e 100644
--- a/lib/database.cc
+++ b/lib/database.cc
@@ -1447,7 +1447,7 @@ _notmuch_database_link_message_to_parents (notmuch_database_t *notmuch,
keys = g_hash_table_get_keys (parents);
for (l = keys; l; l = l->next) {
char *parent_message_id;
- const char *parent_thread_id;
+ const char *parent_thread_id = NULL;
parent_message_id = (char *) l->data;
diff --git a/notmuch-new.c b/notmuch-new.c
index bfb46001..3512de72 100644
--- a/notmuch-new.c
+++ b/notmuch-new.c
@@ -67,7 +67,7 @@ handle_sigint (unused (int sig))
{
static char msg[] = "Stopping... \n";
- write(2, msg, sizeof(msg)-1);
+ (void) write(2, msg, sizeof(msg)-1);
interrupted = 1;
}
diff --git a/notmuch-show.c b/notmuch-show.c
index 8da3295e..19fb49f2 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -866,7 +866,7 @@ do_show_single (void *ctx,
while (!feof (file)) {
size = fread (buf, 1, sizeof (buf), file);
- fwrite (buf, size, 1, stdout);
+ (void) fwrite (buf, size, 1, stdout);
}
fclose (file);
diff --git a/notmuch-tag.c b/notmuch-tag.c
index 537d5a4d..292c5da3 100644
--- a/notmuch-tag.c
+++ b/notmuch-tag.c
@@ -26,7 +26,7 @@ static void
handle_sigint (unused (int sig))
{
static char msg[] = "Stopping... \n";
- write(2, msg, sizeof(msg)-1);
+ (void) write(2, msg, sizeof(msg)-1);
interrupted = 1;
}