diff options
author | Philip Chimento <philip.chimento@gmail.com> | 2020-01-14 21:26:01 -0800 |
---|---|---|
committer | Philip Chimento <philip.chimento@gmail.com> | 2020-01-21 22:35:27 -0800 |
commit | 604d5049372480faf1a9617678e1bbd0b6e22b42 (patch) | |
tree | cabe93a146fda7471894066ae7f0225231a401b7 | |
parent | aad47f9b07dc6105c3ce10059a83efea4a36bcfc (diff) |
build: Address compiler warnings
These warnings are flagged on Meson's warning_level=3.
-rw-r--r-- | clang-plugin/checker.h | 1 | ||||
-rw-r--r-- | clang-plugin/gerror-checker.cpp | 14 | ||||
-rw-r--r-- | clang-plugin/gsignal-checker.cpp | 4 | ||||
-rw-r--r-- | clang-plugin/plugin.cpp | 3 |
4 files changed, 11 insertions, 11 deletions
diff --git a/clang-plugin/checker.h b/clang-plugin/checker.h index faea4fa..bb1cb83 100644 --- a/clang-plugin/checker.h +++ b/clang-plugin/checker.h @@ -42,6 +42,7 @@ extern std::shared_ptr<GirManager> global_gir_manager; class Checker { public: virtual const std::string get_name () const = 0; + virtual ~Checker() {} }; class ASTChecker : public tartan::Checker, diff --git a/clang-plugin/gerror-checker.cpp b/clang-plugin/gerror-checker.cpp index df9f5c7..0717eff 100644 --- a/clang-plugin/gerror-checker.cpp +++ b/clang-plugin/gerror-checker.cpp @@ -411,8 +411,6 @@ GErrorChecker::_handle_eval_g_propagate_error (CheckerContext &context, SVal dest_ptr_location = state->getSVal (call_expr.getArg (0), context.getLocationContext ()); - DEBUG_CODE (SVal dest_location = - this->_error_from_error_ptr (dest_ptr_location, context)); SVal src_location = state->getSVal (call_expr.getArg (1), context.getLocationContext ()); @@ -997,12 +995,12 @@ GErrorChecker::_assert_gerror_unset (SVal error_location, * Returns: false on a bug, true otherwise */ bool -GErrorChecker::_assert_code_in_domain (SVal domain, - SVal code, - ProgramStateRef state, - CheckerContext &context, - const SourceRange &domain_source_range, - const SourceRange &code_source_range) const +GErrorChecker::_assert_code_in_domain (SVal /* domain */, + SVal /* code */, + ProgramStateRef, + CheckerContext &, + const SourceRange & /* domain_source_range */, + const SourceRange & /* code_source_range */) const { /* FIXME: Implement. */ return true; diff --git a/clang-plugin/gsignal-checker.cpp b/clang-plugin/gsignal-checker.cpp index 5f7dfda..60f1f57 100644 --- a/clang-plugin/gsignal-checker.cpp +++ b/clang-plugin/gsignal-checker.cpp @@ -141,7 +141,7 @@ _func_is_gsignal_connect (const FunctionDecl& func) * If the expression is not a GObject, return NULL. */ static GIObjectInfo* _expr_to_gtype (const Expr *expr, - const ASTContext &context, + const ASTContext &, const GirManager &gir_manager) { QualType gobject_type = expr->getType (); @@ -1247,7 +1247,7 @@ _parse_signal_name (const std::string &in) * of the GObject is not known, we can’t check anything. */ static bool _check_gsignal_callback_type (const CallExpr &call, - const FunctionDecl &func, + const FunctionDecl & /* func */, const SignalFuncInfo *func_info, CompilerInstance &compiler, const ASTContext &context, diff --git a/clang-plugin/plugin.cpp b/clang-plugin/plugin.cpp index 5e49c71..a2db3d0 100644 --- a/clang-plugin/plugin.cpp +++ b/clang-plugin/plugin.cpp @@ -74,7 +74,8 @@ protected: * after this function call returns, so must be careful not to retain * state which is needed by the consumers. */ std::unique_ptr<ASTConsumer> - CreateASTConsumer (CompilerInstance &compiler, llvm::StringRef in_file) + CreateASTConsumer (CompilerInstance &compiler, + llvm::StringRef /* in_file */) { /* Try and prevent Tartan’s changes to the AST from actually * affecting compilation. See bug: 844/04c. */ |