]> granicus.if.org Git - apache/commitdiff
Add some __attribute__ for automatic format checking.
authorChristophe Jaillet <jailletc36@apache.org>
Fri, 7 Dec 2012 23:39:05 +0000 (23:39 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Fri, 7 Dec 2012 23:39:05 +0000 (23:39 +0000)
Correct one catch in sed0.c.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418556 13f79535-47bb-0310-9956-ffa450edef68

include/util_filter.h
modules/filters/regexp.h
modules/filters/sed0.c

index 5f6f9afab6210338210b72542813c1a0ea35bec1..8b3c7a848703ac9efc497c95837d4ec65a0ea20c 100644 (file)
@@ -332,8 +332,8 @@ AP_DECLARE(apr_status_t) ap_pass_brigade(ap_filter_t *filter,
 AP_DECLARE(apr_status_t) ap_pass_brigade_fchk(request_rec *r,
                                               apr_bucket_brigade *bucket,
                                               const char *fmt,
-                                              ...);
-
+                                              ...)
+                                              __attribute__((format(printf,3,4)));
 
 /**
  * This function is used to register an input filter with the system.
index 1e5a6269a0b68cf4f2c7955d4ffe84da49dc5d66..6af89120d0e8e475d8bab76311329e1c32112be0 100644 (file)
@@ -69,7 +69,8 @@ typedef struct _sed_comp_args {
 
 extern char *sed_compile(sed_commands_t *commands, sed_comp_args *compargs,
                          char *ep, char *endbuf, int seof);
-extern void command_errf(sed_commands_t *commands, const char *fmt, ...);
+extern void command_errf(sed_commands_t *commands, const char *fmt, ...)
+                         __attribute__((format(printf,2,3)));
 
 #define SEDERR_CGMES "command garbled: %s"
 #define SEDERR_SMMES "Space missing before filename: %s"
index da47122ac047f61943ef73ac582b7bcd5bbf222c..c1f25dfe9a7a3e636f50bc87f51b478a32c5f06b 100644 (file)
@@ -275,7 +275,7 @@ comploop:
         }
 
         if(p > &commands->respace[RESIZE-1]) {
-            command_errf(commands, SEDERR_TMMES);
+            command_errf(commands, SEDERR_TMMES, commands->linebuf);
             return -1;
         }