diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-27 17:56:47 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-27 17:56:47 +0100 |
commit | 91287bb8407e3b9022bc663b07870510aedabbc3 (patch) | |
tree | 36fe3e2615d6d2dde4cd3eb3d8f382ac3d7dd2aa /clang-plugin | |
parent | 939cec679d83d4d1133e358d0377c1d57dde1d82 (diff) | |
download | rspamd-91287bb8407e3b9022bc663b07870510aedabbc3.tar.gz rspamd-91287bb8407e3b9022bc663b07870510aedabbc3.zip |
[Fix] Remove ambigious format flag from printf
Diffstat (limited to 'clang-plugin')
-rw-r--r-- | clang-plugin/printf_check.cc | 14 |
1 files changed, 1 insertions, 13 deletions
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<PrintfArgChecker> (int32_arg_handler, this->pcontext, this->ci); - case 'B': - return llvm::make_unique<PrintfArgChecker> (gboolean_arg_handler, - this->pcontext, this->ci); case 'T': return llvm::make_unique<PrintfArgChecker> (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' }; }; @@ -720,15 +717,6 @@ namespace rspamd { } 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) { |