]> diplodocus.org Git - nmh/commitdiff
imaptest.c: Add `format(printf, ...)' attribute to functions.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 27 Oct 2017 11:31:54 +0000 (12:31 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 27 Oct 2017 14:08:33 +0000 (15:08 +0100)
Stops warnings from gcc for send_imap_command() and add_msg().

uip/imaptest.c

index f937cb5..66c033c 100644 (file)
@@ -73,14 +73,14 @@ static int capability_set(const char *);
 static void clear_capability(void);
 static int have_capability(void);
 static int send_imap_command(netsec_context *, int noflush, char **errstr,
 static void clear_capability(void);
 static int have_capability(void);
 static int send_imap_command(netsec_context *, int noflush, char **errstr,
-                            const char *fmt, ...);
+                            const char *fmt, ...) CHECK_PRINTF(4, 5);
 static int get_imap_response(netsec_context *, const char *token,
                             char **tokenresp, char **status, int failerr,
                             char **errstr);
 
 static void ts_report(const char *str, struct timeval *tv);
 
 static int get_imap_response(netsec_context *, const char *token,
                             char **tokenresp, char **status, int failerr,
                             char **errstr);
 
 static void ts_report(const char *str, struct timeval *tv);
 
-static void add_msg(int queue, const char *fmt, ...);
+static void add_msg(int queue, const char *fmt, ...) CHECK_PRINTF(2, 3);
 
 static bool timestamp = false;
 
 
 static bool timestamp = false;