]> git.cworth.org Git - notmuch/commitdiff
notmuch: Quiet buildbot warnings.
authorDavid Edmondson <dme@dme.org>
Tue, 20 Dec 2011 15:20:04 +0000 (15:20 +0000)
committerDavid Bremner <bremner@debian.org>
Wed, 21 Dec 2011 11:32:16 +0000 (07:32 -0400)
Cast away the result of various *write functions. Provide a default
value for some variables to avoid "use before set" warnings.

lib/database.cc
notmuch-new.c
notmuch-show.c
notmuch-tag.c

index 98f101e6e617a04e9b6c26213f7e35a03dd5c0c3..f1a9dc2ed25f9934bf990cc40d40375fb108ece5 100644 (file)
@@ -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;
 
index bfb460013622959eaa8eca2dc6cd0a1df590a85e..3512de727734ad48025f3f88972587fed91d838b 100644 (file)
@@ -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;
 }
 
index 8da3295e3cee204c7ac847928fbe477c1608b659..19fb49f29b89172b63eed772ab79297e986904a1 100644 (file)
@@ -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);
index 537d5a4d1625d0747b1fe74f2045a150ee4b67d9..292c5da3f824a222caceed290109cabed40e959c 100644 (file)
@@ -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;
 }