BIND 10 trac2726, updated. a9f39355b94fe20924aa02f849e35e7000c67631 [2726] Add src/bin/ to cppcheck include path too

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 13 10:14:02 UTC 2013


The branch, trac2726 has been updated
       via  a9f39355b94fe20924aa02f849e35e7000c67631 (commit)
       via  2cd1c10416f27e6b054c3fe4726ea771f63d0bb2 (commit)
       via  2652e68f004f5c329b4979e93bbc020fb59af32d (commit)
       via  421e22c7f1437c632a7e9aa904662a9344b13446 (commit)
      from  0f00c3880a0cb7498cd5adb86831f779d57d321f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a9f39355b94fe20924aa02f849e35e7000c67631
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Jun 13 15:40:40 2013 +0530

    [2726] Add src/bin/ to cppcheck include path too

commit 2cd1c10416f27e6b054c3fe4726ea771f63d0bb2
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Jun 13 15:40:14 2013 +0530

    [2726] Constify variable

commit 2652e68f004f5c329b4979e93bbc020fb59af32d
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Jun 13 15:40:04 2013 +0530

    [2726] Update coding style

commit 421e22c7f1437c632a7e9aa904662a9344b13446
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Jun 13 15:39:49 2013 +0530

    [2726] Fix array index

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                         |    2 +-
 src/lib/cc/data.cc                  |    2 +-
 src/lib/datasrc/memory/domaintree.h |    2 +-
 src/lib/dns/serial.h                |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-----------------------------------------------------------------------
diff --git a/Makefile.am b/Makefile.am
index edfce76..392b985 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -110,7 +110,7 @@ report-coverage: report-cpp-coverage report-python-coverage
 
 # for static C++ check using cppcheck (when available)
 cppcheck:
-	cppcheck -I./src/lib --enable=all --suppressions \
+	cppcheck -I./src/lib -I./src/bin --enable=all --suppressions \
 		src/cppcheck-suppress.lst --inline-suppr \
 		--quiet --error-exitcode=1 \
 		--template '{file}:{line}: check_fail: {message} ({severity},{id})' \
diff --git a/src/lib/cc/data.cc b/src/lib/cc/data.cc
index c72fdb5..81bf97d 100644
--- a/src/lib/cc/data.cc
+++ b/src/lib/cc/data.cc
@@ -690,7 +690,7 @@ StringElement::toJSON(std::ostream& ss) const {
     ss << "\"";
     const std::string& str = stringValue();
     for (size_t i = 0; i < str.size(); ++i) {
-        char c = str[i];
+        const char c = str[i];
         // Escape characters as defined in JSON spec
         // Note that we do not escape forward slash; this
         // is allowed, but not mandatory.
diff --git a/src/lib/datasrc/memory/domaintree.h b/src/lib/datasrc/memory/domaintree.h
index 68b58a7..36e1bc9 100644
--- a/src/lib/datasrc/memory/domaintree.h
+++ b/src/lib/datasrc/memory/domaintree.h
@@ -709,7 +709,7 @@ public:
         // To silence cppcheck. We don't really use the values before
         // initialization, but this is cleaner anyway.
         for (size_t i = 0; i < RBT_MAX_LEVEL; ++i) {
-            nodes_[0] = NULL;
+            nodes_[i] = NULL;
         }
     }
 
diff --git a/src/lib/dns/serial.h b/src/lib/dns/serial.h
index a3324eb..0cd6833 100644
--- a/src/lib/dns/serial.h
+++ b/src/lib/dns/serial.h
@@ -59,7 +59,7 @@ public:
     /// \brief Direct assignment from other Serial
     ///
     /// \param other The Serial to assign the value from
-    Serial &operator=(const Serial& other) {
+    Serial& operator=(const Serial& other) {
         value_ = other.getValue();
         return (*this);
     }



More information about the bind10-changes mailing list