[cfe-commits] [Patch] -Wformat: better handling of qualifiers on pointer arguments

Hans Wennborg hans at chromium.org
Tue Jul 31 03:25:18 PDT 2012

Hi all,

The attached patch makes Clang warn about passing in pointers to
const-qualified types to scanf, such as passing in "const int*" for a
"%d" format string.

It also ignores the volatile-qualifier, allowing to pass in a
"volatile int*" pointer for a "%n" format string.

Please take a look!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wformat_type_qualifiers.patch
Type: application/octet-stream
Size: 3502 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120731/0b5b3b45/attachment.obj>

More information about the cfe-commits mailing list