diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2008-11-29 15:29:33 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2008-11-29 15:29:33 +0000 |
commit | 9a7c28cd5aeb577740ccb37e9e740a177223a762 (patch) | |
tree | 0c50e9e344a11805bfd2a56caef7d8350f2156c4 /funcs/Makefile | |
parent | 445c5296da9c1dede150d945a6794e3085ad37e8 (diff) |
we can now build with -Wformat=2, which found a couple of real bugs
because SPRINTF() use non-literal format strings (which cannot be checked), move it into its own module so the rest of func_strings can benefit from format string checking
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@159774 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'funcs/Makefile')
-rw-r--r-- | funcs/Makefile | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/funcs/Makefile b/funcs/Makefile index 9b13b17a0..bc4745d08 100644 --- a/funcs/Makefile +++ b/funcs/Makefile @@ -18,3 +18,10 @@ MENUSELECT_DESCRIPTION=Dialplan Functions all: _all include $(ASTTOPDIR)/Makefile.moddir_rules + +# the SPRINTF() function in func_sprintf accepts format specifiers +# and thus passes them to snprintf() as non-literal strings; the compiler +# can't check the string and arguments to ensure they match, so this +# warning must be disabled; for safety reasons, SPRINTF() is kept in +# a separate module so that as little code as possible is left unchecked +func_sprintf.o: ASTCFLAGS+=-Wno-format-nonliteral |