[(pushed)] analyzer: fix Clang warnings

Message ID e42c1e38-a53e-885d-8e0a-6b4d218c6328@suse.cz
State New
Headers
Series [(pushed)] analyzer: fix Clang warnings |

Commit Message

Martin Liška Nov. 24, 2022, 7:42 a.m. UTC
  Fixes the following warnings:
gcc/analyzer/varargs.cc:655:8: warning: 'matches_call_types_p' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]
gcc/analyzer/varargs.cc:707:50: warning: unused parameter 'cd' [-Wunused-parameter]
gcc/analyzer/varargs.cc:707:8: warning: 'matches_call_types_p' overrides a member function but is not marked 'override' [-Winconsistent-missing-override]

gcc/analyzer/ChangeLog:

	* varargs.cc: Fix Clang warnings.
---
 gcc/analyzer/varargs.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/analyzer/varargs.cc b/gcc/analyzer/varargs.cc
index 1da5a46f677..daa937d9c65 100644
--- a/gcc/analyzer/varargs.cc
+++ b/gcc/analyzer/varargs.cc
@@ -652,7 +652,7 @@  make_va_list_state_machine (logger *logger)
 class kf_va_start : public known_function
 {
 public:
-  bool matches_call_types_p (const call_details &) const
+  bool matches_call_types_p (const call_details &) const final override
   {
     return true;
   }
@@ -704,7 +704,7 @@  kf_va_start::impl_call_pre (const call_details &cd) const
 class kf_va_copy : public known_function
 {
 public:
-  bool matches_call_types_p (const call_details &cd) const
+  bool matches_call_types_p (const call_details &) const final override
   {
     return true;
   }