From e28489467233bff4500a70f8a7b22e42ca3b3e68 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 30 May 2012 12:14:38 -0400 Subject: Add __attribute__(format)s for our varargs printf/scanf wrappers It turns out that if you set the third argument of __attribute__(format) to 0, GCC and Clang will check the format argument without expecting to find variadic arguments. This is the correct behavior for vsnprintf, vasprintf, and vscanf. I'm hoping this will fix bug 5969 (a clang warning) by telling clang that the format argument to tor_vasprintf is indeed a format string. --- changes/bug5969_022 | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changes/bug5969_022 (limited to 'changes') diff --git a/changes/bug5969_022 b/changes/bug5969_022 new file mode 100644 index 0000000000..57c8744267 --- /dev/null +++ b/changes/bug5969_022 @@ -0,0 +1,7 @@ + o Minor bugfixes + - Fix a build warning with Clang 3.1 related to our use of vasprint. + Fix for bug 5969. Bugfix on 0.2.2.11-alpha. + + o Compilation improvements: + - Tell GCC and Clang to check for any errors in format strings passed + to the tor_v*(print|scan)f functions. -- cgit v1.2.3-54-g00ecf