Parcourir la source

[3736] Remove the unreadVariable cppcheck error in rdata/template.cc

Marcin Siodelski il y a 10 ans
Parent
commit
69d0ba4773
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      src/lib/dns/rdata/template.cc

+ 4 - 3
src/lib/dns/rdata/template.cc

@@ -1,4 +1,4 @@
-// Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011,2015 Internet Systems Consortium, Inc. ("ISC")
 //
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
 // purpose with or without fee is hereby granted, provided that the above
@@ -61,11 +61,12 @@ MyType::toWire(AbstractMessageRenderer& renderer) const {
 }
 }
 
 
 int
 int
-MyType::compare(const Rdata& other) const {
+MyType::compare(const Rdata&) const {
     // The compare method normally begins with this dynamic cast.
     // The compare method normally begins with this dynamic cast.
     // cppcheck-suppress unreadVariable
     // cppcheck-suppress unreadVariable
-    const MyType& other_mytype = dynamic_cast<const MyType&>(other);
+    // const MyType& other_mytype = dynamic_cast<const MyType&>(other);
     // ...
     // ...
+    return (0);
 }
 }
 
 
 // END_RDATA_NAMESPACE
 // END_RDATA_NAMESPACE