aboutsummaryrefslogtreecommitdiffstats
path: root/utils/extconf.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 15:58:50 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-03-18 15:58:50 +0000
commit48d2267d2d05bf4acaa2ae4e00e3d9b600cce235 (patch)
treeb91e3d85242f15336883bd197abbe86cd66fdfc8 /utils/extconf.c
parent99e420ecd8ad845f253266482101298583994c00 (diff)
Merged revisions 109447 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk ........ r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'utils/extconf.c')
-rw-r--r--utils/extconf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/extconf.c b/utils/extconf.c
index 5d4b21eac..84b3fb546 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -338,6 +338,7 @@ char * attribute_malloc _ast_strndup(const char *str, size_t len, const char *fi
_ast_asprintf((ret), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, __VA_ARGS__)
AST_INLINE_API(
+__attribute__((format (printf, 5, 6)))
int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, ...),
{
int res;
@@ -364,6 +365,7 @@ int _ast_asprintf(char **ret, const char *file, int lineno, const char *func, co
_ast_vasprintf((ret), __FILE__, __LINE__, __PRETTY_FUNCTION__, (fmt), (ap))
AST_INLINE_API(
+__attribute__((format (printf, 5, 0)))
int _ast_vasprintf(char **ret, const char *file, int lineno, const char *func, const char *fmt, va_list ap),
{
int res;
@@ -2729,7 +2731,7 @@ static void ast_log(int level, const char *file, int line, const char *function,
va_end(vars);
}
-static void ast_verbose(const char *fmt, ...)
+static void __attribute__((format (printf, 1, 2))) ast_verbose(const char *fmt, ...)
{
va_list vars;
va_start(vars,fmt);