shill: Fix most of warnings from cpplint
Fix most cpplinter's warnings. On a few occasisions, the warnings
produced were false-positives, so added explicit // NOLINT comment
overrides.
There were a few instances of disallowed non-const reference usage
(reported as runtime/reference error by cpplint) for
"DBus::Error &error" which should potentially be changed
to pointers to comply with C++ coding style but I will let Shill
owners do that since there is quite a few of those and the
change isn't brain-dead simple...
BUG=None
TEST=platform2 still compiles and all unit tests pass.
Change-Id: Ic2e31896aa13d20eeb1a85dee74f3db8cccfde2e
Reviewed-on: https://chromium-review.googlesource.com/204164
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/traffic_monitor_unittest.cc b/traffic_monitor_unittest.cc
index 225f289..a36bffb 100644
--- a/traffic_monitor_unittest.cc
+++ b/traffic_monitor_unittest.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <string>
+#include <vector>
+
#include "shill/traffic_monitor.h"
#include <base/bind.h>
@@ -131,13 +134,13 @@
};
// static
-const string TrafficMonitorTest::kLocalIpAddr = "127.0.0.1";
+const string TrafficMonitorTest::kLocalIpAddr = "127.0.0.1"; // NOLINT - string
const uint16 TrafficMonitorTest::kLocalPort1 = 1234;
const uint16 TrafficMonitorTest::kLocalPort2 = 2345;
const uint16 TrafficMonitorTest::kLocalPort3 = 3456;
const uint16 TrafficMonitorTest::kLocalPort4 = 4567;
const uint16 TrafficMonitorTest::kLocalPort5 = 4567;
-const string TrafficMonitorTest::kRemoteIpAddr = "192.168.1.1";
+const string TrafficMonitorTest::kRemoteIpAddr = "192.168.1.1"; // NOLINT - str
const uint16 TrafficMonitorTest::kRemotePort = 5678;
const uint64 TrafficMonitorTest::kTxQueueLength1 = 111;
const uint64 TrafficMonitorTest::kTxQueueLength2 = 222;