diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-11 15:49:28 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-11 15:49:28 +0000 |
commit | dbac29badb4c5542caa0334c2d82ff9328d253a1 (patch) | |
tree | 3c311bb6145873ade2f2f6fc13fbab7979089f2f /clang-plugin | |
parent | 43dcc8cbad0da2305009dfadcd6cef9228958b52 (diff) | |
download | rspamd-dbac29badb4c5542caa0334c2d82ff9328d253a1.tar.gz rspamd-dbac29badb4c5542caa0334c2d82ff9328d253a1.zip |
Allow void * as %s arg.
Diffstat (limited to 'clang-plugin')
-rw-r--r-- | clang-plugin/printf_check.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index d4d00fab4..c331942d9 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -419,8 +419,10 @@ namespace rspamd { if (!ptr_type->isCharType ()) { /* We might have gchar * here */ auto desugared_type = ptr_type->getUnqualifiedDesugaredType (); + auto desugared_ptr_type = type->getUnqualifiedDesugaredType (); - if (!desugared_type || !desugared_type->isCharType ()) { + if (!desugared_type || (!desugared_type->isCharType () && + !desugared_ptr_type->isVoidPointerType ())) { if (desugared_type) { desugared_type->dump (); } |