[notmuch] [PATCH 2/2] * avoid gcc 4.4.1 compiler warning due to ignored 'fflush' return value

Subject: [notmuch] [PATCH 2/2] * avoid gcc 4.4.1 compiler warning due to ignored 'fflush' return value

Date: Mon, 23 Nov 2009 08:21:50 +0200

To: notmuch@notmuchmail org

Cc:

From: Dirk-Jan C. Binnema



---
 notmuch-setup.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/notmuch-setup.c b/notmuch-setup.c
index d06fbf8..c50f812 100644
--- a/notmuch-setup.c
+++ b/notmuch-setup.c
@@ -100,12 +100,13 @@ notmuch_setup_command (unused (void *ctx),
     unsigned int i;
     int is_new;
 
-#define prompt(format, ...)				\
-    do {						\
-	printf (format, ##__VA_ARGS__);			\
-	fflush (stdout);				\
-	getline (&response, &response_size, stdin);	\
-	chomp_newline (response);			\
+#define prompt(format, ...)					\
+    do {							\
+	int ignored;						\
+	printf (format, ##__VA_ARGS__);				\
+	fflush (stdout);					\
+	ignored = getline (&response, &response_size, stdin);	\
+	chomp_newline (response);				\
     } while (0)
 
     config = notmuch_config_open (ctx, NULL, &is_new);
-- 
1.6.3.3


Thread: