From dbac29badb4c5542caa0334c2d82ff9328d253a1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 11 Nov 2015 15:49:28 +0000 Subject: [PATCH] Allow void * as %s arg. --- clang-plugin/printf_check.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 (); } -- 2.39.5