From 91287bb8407e3b9022bc663b07870510aedabbc3 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 27 Oct 2018 17:56:47 +0100 Subject: [Fix] Remove ambigious format flag from printf --- clang-plugin/printf_check.cc | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'clang-plugin') diff --git a/clang-plugin/printf_check.cc b/clang-plugin/printf_check.cc index 9b4819d08..f8a78aa0b 100644 --- a/clang-plugin/printf_check.cc +++ b/clang-plugin/printf_check.cc @@ -187,9 +187,6 @@ namespace rspamd { case 'D': return llvm::make_unique (int32_arg_handler, this->pcontext, this->ci); - case 'B': - return llvm::make_unique (gboolean_arg_handler, - this->pcontext, this->ci); case 'T': return llvm::make_unique (tok_arg_handler, this->pcontext, this->ci); @@ -369,7 +366,7 @@ namespace rspamd { format_specs = { 's', 'd', 'l', 'L', 'v', 'V', 'f', 'F', 'g', 'G', - 'T', 'z', 'D', 'c', 'p', 'P', 'e', 'B' + 'T', 'z', 'D', 'c', 'p', 'P', 'e' }; }; @@ -719,15 +716,6 @@ namespace rspamd { return true; } - static bool - gboolean_arg_handler (const Expr *arg, struct PrintfArgChecker *ctx) - { - return check_builtin_type (arg, - ctx, - {BuiltinType::Kind::Int}, // gboolean is int in fact - "%b"); - } - static bool check_struct_type (const Expr *arg, struct PrintfArgChecker *ctx, const std::string &sname, const std::string &fmt) -- cgit v1.2.3