From: Vsevolod Stakhov Date: Wed, 11 Nov 2015 15:49:28 +0000 (+0000) Subject: Allow void * as %s arg. X-Git-Tag: 1.1.0~587 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dbac29badb4c5542caa0334c2d82ff9328d253a1;p=thirdparty%2Frspamd.git Allow void * as %s arg. --- diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index d4d00fab46..c331942d9c 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 (); }