Browse Source

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

Marcin Siodelski 10 years ago
parent
commit
69d0ba4773
1 changed files with 4 additions and 3 deletions
  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
 // purpose with or without fee is hereby granted, provided that the above
@@ -61,11 +61,12 @@ MyType::toWire(AbstractMessageRenderer& renderer) const {
 }
 
 int
-MyType::compare(const Rdata& other) const {
+MyType::compare(const Rdata&) const {
     // The compare method normally begins with this dynamic cast.
     // 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