summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Jaillet <jailletc36@apache.org>2012-12-08 00:39:05 +0100
committerChristophe Jaillet <jailletc36@apache.org>2012-12-08 00:39:05 +0100
commitd275f854fa5db3ef8538fb003a488aad5588ea58 (patch)
tree295ca2df323755de766f491d18d2077c7a2ff435
parentUse ap_rputs instead of ap_rvputs where applicable. (diff)
downloadapache2-d275f854fa5db3ef8538fb003a488aad5588ea58.tar.xz
apache2-d275f854fa5db3ef8538fb003a488aad5588ea58.zip
Add some __attribute__ for automatic format checking.
Correct one catch in sed0.c. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1418556 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/util_filter.h4
-rw-r--r--modules/filters/regexp.h3
-rw-r--r--modules/filters/sed0.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/include/util_filter.h b/include/util_filter.h
index 5f6f9afab6..8b3c7a8487 100644
--- a/include/util_filter.h
+++ b/include/util_filter.h
@@ -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.
diff --git a/modules/filters/regexp.h b/modules/filters/regexp.h
index 1e5a6269a0..6af89120d0 100644
--- a/modules/filters/regexp.h
+++ b/modules/filters/regexp.h
@@ -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"
diff --git a/modules/filters/sed0.c b/modules/filters/sed0.c
index da47122ac0..c1f25dfe9a 100644
--- a/modules/filters/sed0.c
+++ b/modules/filters/sed0.c
@@ -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;
}