summaryrefslogtreecommitdiffstats
path: root/clang-plugin
diff options
context:
space:
mode:
Diffstat (limited to 'clang-plugin')
-rw-r--r--clang-plugin/printf_check.cc4
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 ();
}