You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2012/12/08 00:39:06 UTC

svn commit: r1418556 - in /httpd/httpd/trunk: include/util_filter.h modules/filters/regexp.h modules/filters/sed0.c

Author: jailletc36
Date: Fri Dec  7 23:39:05 2012
New Revision: 1418556

URL: http://svn.apache.org/viewvc?rev=1418556&view=rev
Log:
Add some __attribute__ for automatic format checking.
Correct one catch in sed0.c.

Modified:
    httpd/httpd/trunk/include/util_filter.h
    httpd/httpd/trunk/modules/filters/regexp.h
    httpd/httpd/trunk/modules/filters/sed0.c

Modified: httpd/httpd/trunk/include/util_filter.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/include/util_filter.h?rev=1418556&r1=1418555&r2=1418556&view=diff
==============================================================================
--- httpd/httpd/trunk/include/util_filter.h (original)
+++ httpd/httpd/trunk/include/util_filter.h Fri Dec  7 23:39:05 2012
@@ -332,8 +332,8 @@ AP_DECLARE(apr_status_t) ap_pass_brigade
 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.

Modified: httpd/httpd/trunk/modules/filters/regexp.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/regexp.h?rev=1418556&r1=1418555&r2=1418556&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/regexp.h (original)
+++ httpd/httpd/trunk/modules/filters/regexp.h Fri Dec  7 23:39:05 2012
@@ -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"

Modified: httpd/httpd/trunk/modules/filters/sed0.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/sed0.c?rev=1418556&r1=1418555&r2=1418556&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/sed0.c (original)
+++ httpd/httpd/trunk/modules/filters/sed0.c Fri Dec  7 23:39:05 2012
@@ -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;
         }