summaryrefslogtreecommitdiff
path: root/utils/extconf.c
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2008-03-18 15:43:34 +0000
committerTerry Wilson <twilson@digium.com>2008-03-18 15:43:34 +0000
commitb02bc230af68d05df171a0a099d6c3d94168ab64 (patch)
treea07721daf3a91733bc3e073bab0697333d426e21 /utils/extconf.c
parent760fc3403c7355fa05bc1b7470405239aad7af8e (diff)
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: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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 4ff6e1dc0..5934b5c8c 100644
--- a/utils/extconf.c
+++ b/utils/extconf.c
@@ -1078,6 +1078,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;
@@ -1104,6 +1105,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;
@@ -2733,7 +2735,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);