shill: enable (don't disable) -Wunused

having fixed an unused parameter in the dbus-c++ headers, those
headers no longer have unused parameters. so, if we fix up unused
parameters in shill code, we can compile with -Wunused. (this is
implied by -Wall, as long as we don't override with -Wno-unused.)

BUG=chromium-os:20779
TEST=unittests

- comment out unused parameters in function definitions
- remove some unused local variables
- also: fix an old-style cast

Change-Id: Ie654a7b34d622cecb0f26bd47c17813fe8423001
Reviewed-on: http://gerrit.chromium.org/gerrit/8365
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/Makefile b/Makefile
index 35fdd7c..c1f4639 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,6 @@
 CXX ?= g++
 CXXFLAGS ?= -fno-strict-aliasing
 CXXFLAGS += -Wall -Wextra -Werror -Wuninitialized -Woverloaded-virtual
-# Disable a warning which occurs repeatedly in the dbus-c++ headers.
-CXXFLAGS += -Wno-unused
 CXXFLAGS += $(EXTRA_CXXFLAGS)
 CPPFLAGS ?= -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
 PKG_CONFIG ?= pkg-config
diff --git a/byte_string_unittest.cc b/byte_string_unittest.cc
index fb35c34..ac88f9f 100644
--- a/byte_string_unittest.cc
+++ b/byte_string_unittest.cc
@@ -112,7 +112,6 @@
 
 TEST_F(ByteStringTest, Resize) {
   ByteString bs1(kTest2, sizeof(kTest2));
-  uint32 val;
 
   bs1.Resize(sizeof(kTest2) + 10);
   EXPECT_EQ(sizeof(kTest2) + 10, bs1.GetLength());
diff --git a/cellular.cc b/cellular.cc
index e333a3b..b3142d5 100644
--- a/cellular.cc
+++ b/cellular.cc
@@ -967,7 +967,7 @@
   HandleNewSignalQuality(strength);
 }
 
-void Cellular::OnGSMNetworkModeChanged(uint32 mode) {
+void Cellular::OnGSMNetworkModeChanged(uint32 /*mode*/) {
   // TODO(petkov): Implement this.
   NOTIMPLEMENTED();
 }
@@ -987,9 +987,9 @@
   HandleNewSignalQuality(quality);
 }
 
-void Cellular::OnModemStateChanged(uint32 old_state,
-                                   uint32 new_state,
-                                   uint32 reason) {
+void Cellular::OnModemStateChanged(uint32 /*old_state*/,
+                                   uint32 /*new_state*/,
+                                   uint32 /*reason*/) {
   // TODO(petkov): Implement this.
   NOTIMPLEMENTED();
 }
diff --git a/cellular_unittest.cc b/cellular_unittest.cc
index 12d6a28..3b8637f 100644
--- a/cellular_unittest.cc
+++ b/cellular_unittest.cc
@@ -148,36 +148,37 @@
    public:
     explicit TestProxyFactory(CellularTest *test) : test_(test) {}
 
-    virtual ModemProxyInterface *CreateModemProxy(ModemProxyListener *listener,
-                                                  const string &path,
-                                                  const string &service) {
+    virtual ModemProxyInterface *CreateModemProxy(
+        ModemProxyListener */*listener*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->proxy_.release();
     }
 
     virtual ModemSimpleProxyInterface *CreateModemSimpleProxy(
-        const string &path,
-        const string &service) {
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->simple_proxy_.release();
     }
 
     virtual ModemCDMAProxyInterface *CreateModemCDMAProxy(
-        ModemCDMAProxyListener *listener,
-        const string &path,
-        const string &service) {
+        ModemCDMAProxyListener */*listener*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->cdma_proxy_.release();
     }
 
     virtual ModemGSMCardProxyInterface *CreateModemGSMCardProxy(
-        ModemGSMCardProxyListener *listener,
-        const string &path,
-        const string &service) {
+        ModemGSMCardProxyListener */*listener*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->gsm_card_proxy_.release();
     }
 
     virtual ModemGSMNetworkProxyInterface *CreateModemGSMNetworkProxy(
-        ModemGSMNetworkProxyListener *listener,
-        const string &path,
-        const string &service) {
+        ModemGSMNetworkProxyListener */*listener*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->gsm_network_proxy_.release();
     }
 
diff --git a/dbus_adaptor.cc b/dbus_adaptor.cc
index 808b325..d1c082d 100644
--- a/dbus_adaptor.cc
+++ b/dbus_adaptor.cc
@@ -84,7 +84,7 @@
 // static
 bool DBusAdaptor::GetProperties(const PropertyStore &store,
                                 map<string, ::DBus::Variant> *out,
-                                ::DBus::Error *error) {
+                                ::DBus::Error */*error*/) {
   {
     PropertyConstIterator<bool> it = store.GetBoolPropertiesIter();
     for ( ; !it.AtEnd(); it.Advance())
diff --git a/device.cc b/device.cc
index 7f72cdf..12300a9 100644
--- a/device.cc
+++ b/device.cc
@@ -135,7 +135,7 @@
           << (selected_service_.get() ? "is set." : "is not set.");
 }
 
-bool Device::TechnologyIs(const Technology::Identifier type) const {
+bool Device::TechnologyIs(const Technology::Identifier /*type*/) const {
   return false;
 }
 
@@ -154,29 +154,30 @@
   error->Populate(Error::kNotSupported, kMessage);
 }
 
-void Device::RegisterOnNetwork(const std::string &network_id, Error *error) {
+void Device::RegisterOnNetwork(const std::string &/*network_id*/,
+                               Error *error) {
   const string kMessage = "Device doesn't support network registration.";
   LOG(ERROR) << kMessage;
   CHECK(error);
   error->Populate(Error::kNotSupported, kMessage);
 }
 
-void Device::RequirePIN(const string &pin, bool require, Error *error) {
+void Device::RequirePIN(const string &/*pin*/, bool /*require*/, Error *error) {
   const string kMessage = "Device doesn't support RequirePIN.";
   LOG(ERROR) << kMessage;
   CHECK(error);
   error->Populate(Error::kNotSupported, kMessage);
 }
 
-void Device::EnterPIN(const string &pin, Error *error) {
+void Device::EnterPIN(const string &/*pin*/, Error *error) {
   const string kMessage = "Device doesn't support EnterPIN.";
   LOG(ERROR) << kMessage;
   CHECK(error);
   error->Populate(Error::kNotSupported, kMessage);
 }
 
-void Device::UnblockPIN(const string &unblock_code,
-                        const string &pin,
+void Device::UnblockPIN(const string &/*unblock_code*/,
+                        const string &/*pin*/,
                         Error *error) {
   const string kMessage = "Device doesn't support UnblockPIN.";
   LOG(ERROR) << kMessage;
@@ -184,8 +185,8 @@
   error->Populate(Error::kNotSupported, kMessage);
 }
 
-void Device::ChangePIN(const string &old_pin,
-                       const string &new_pin,
+void Device::ChangePIN(const string &/*old_pin*/,
+                       const string &/*new_pin*/,
                        Error *error) {
   const string kMessage = "Device doesn't support ChangePIN.";
   LOG(ERROR) << kMessage;
diff --git a/device_dbus_adaptor.cc b/device_dbus_adaptor.cc
index 521ef9f..564b811 100644
--- a/device_dbus_adaptor.cc
+++ b/device_dbus_adaptor.cc
@@ -71,7 +71,7 @@
 }
 
 void DeviceDBusAdaptor::ClearProperty(const std::string& ,
-                                      ::DBus::Error &error) {
+                                      ::DBus::Error &/*error*/) {
 }
 
 void DeviceDBusAdaptor::ProposeScan(::DBus::Error &error) {
@@ -81,7 +81,7 @@
 }
 
 ::DBus::Path DeviceDBusAdaptor::AddIPConfig(const string& ,
-                                            ::DBus::Error &error) {
+                                            ::DBus::Error &/*error*/) {
   return ::DBus::Path();
 }
 
diff --git a/device_info_unittest.cc b/device_info_unittest.cc
index 6b44252..b1a2c2d 100644
--- a/device_info_unittest.cc
+++ b/device_info_unittest.cc
@@ -40,8 +40,8 @@
 class TestEventDispatcher : public EventDispatcher {
  public:
   virtual IOInputHandler *CreateInputHandler(
-      int fd,
-      Callback1<InputData*>::Type *callback) {
+      int /*fd*/,
+      Callback1<InputData*>::Type */*callback*/) {
     return NULL;
   }
 };
diff --git a/dhcp_config_unittest.cc b/dhcp_config_unittest.cc
index 45c62fc..d6d3929 100644
--- a/dhcp_config_unittest.cc
+++ b/dhcp_config_unittest.cc
@@ -56,7 +56,7 @@
    public:
     explicit TestProxyFactory(DHCPConfigTest *test) : test_(test) {}
 
-    virtual DHCPProxyInterface *CreateDHCPProxy(const string &service) {
+    virtual DHCPProxyInterface *CreateDHCPProxy(const string &/*service*/) {
       return test_->proxy_.release();
     }
 
diff --git a/dhcpcd_proxy.cc b/dhcpcd_proxy.cc
index f1483e8..a5a7c1f 100644
--- a/dhcpcd_proxy.cc
+++ b/dhcpcd_proxy.cc
@@ -93,14 +93,15 @@
 
 DHCPCDProxy::Proxy::~Proxy() {}
 
-void DHCPCDProxy::Proxy::Event(const uint32_t &pid,
-                               const std::string &reason,
-                               const DHCPConfig::Configuration &configuration) {
+void DHCPCDProxy::Proxy::Event(
+    const uint32_t &/*pid*/,
+    const std::string &/*reason*/,
+    const DHCPConfig::Configuration &/*configuration*/) {
   NOTREACHED();
 }
 
-void DHCPCDProxy::Proxy::StatusChanged(const uint32_t &pid,
-                                       const std::string &status) {
+void DHCPCDProxy::Proxy::StatusChanged(const uint32_t &/*pid*/,
+                                       const std::string &/*status*/) {
   NOTREACHED();
 }
 
diff --git a/ephemeral_profile.cc b/ephemeral_profile.cc
index 372f4af..3abfec0 100644
--- a/ephemeral_profile.cc
+++ b/ephemeral_profile.cc
@@ -25,11 +25,11 @@
 
 EphemeralProfile::~EphemeralProfile() {}
 
-void EphemeralProfile::Finalize(StoreInterface *storage) {
+void EphemeralProfile::Finalize(StoreInterface */*storage*/) {
   services()->clear();
 }
 
-bool EphemeralProfile::Save(StoreInterface *storage) {
+bool EphemeralProfile::Save(StoreInterface */*storage*/) {
   NOTREACHED();
   return false;
 }
diff --git a/ephemeral_profile.h b/ephemeral_profile.h
index 066e5a2..f587442 100644
--- a/ephemeral_profile.h
+++ b/ephemeral_profile.h
@@ -35,7 +35,7 @@
   virtual bool Save(StoreInterface *storage);
 
   // Leaves |path| untouched and returns false.
-  virtual bool GetStoragePath(FilePath *path) { return false; }
+  virtual bool GetStoragePath(FilePath */*path*/) { return false; }
 
  private:
   DISALLOW_COPY_AND_ASSIGN(EphemeralProfile);
diff --git a/ethernet_service.cc b/ethernet_service.cc
index 783cbf8..44a66e6 100644
--- a/ethernet_service.cc
+++ b/ethernet_service.cc
@@ -41,7 +41,7 @@
 
 EthernetService::~EthernetService() { }
 
-void EthernetService::Connect(Error *error) { }
+void EthernetService::Connect(Error */*error*/) { }
 
 void EthernetService::Disconnect() { }
 
diff --git a/glib_io_handler.cc b/glib_io_handler.cc
index 4be7227..1af9692 100644
--- a/glib_io_handler.cc
+++ b/glib_io_handler.cc
@@ -19,8 +19,8 @@
   channel_ = g_io_channel_unix_new(fd);
   g_io_channel_set_close_on_unref(channel_, TRUE);
   source_id_ = g_io_add_watch(channel_,
-                              (GIOCondition)(G_IO_IN | G_IO_NVAL |
-                                             G_IO_HUP | G_IO_ERR),
+                              static_cast<GIOCondition>(
+                                  G_IO_IN | G_IO_NVAL | G_IO_HUP | G_IO_ERR),
                               DispatchIOHandler, this);
 }
 
diff --git a/ipconfig_dbus_adaptor.cc b/ipconfig_dbus_adaptor.cc
index 226adec..e409684 100644
--- a/ipconfig_dbus_adaptor.cc
+++ b/ipconfig_dbus_adaptor.cc
@@ -77,19 +77,19 @@
   }
 }
 
-void IPConfigDBusAdaptor::ClearProperty(const std::string& name,
-                                        ::DBus::Error &error) {
+void IPConfigDBusAdaptor::ClearProperty(const std::string& /*name*/,
+                                        ::DBus::Error &/*error*/) {
 }
 
-void IPConfigDBusAdaptor::Remove(::DBus::Error &error) {
+void IPConfigDBusAdaptor::Remove(::DBus::Error &/*error*/) {
 }
 
-void IPConfigDBusAdaptor::MoveBefore(const ::DBus::Path& path,
-                                     ::DBus::Error &error) {
+void IPConfigDBusAdaptor::MoveBefore(const ::DBus::Path& /*path*/,
+                                     ::DBus::Error &/*error*/) {
 }
 
-void IPConfigDBusAdaptor::MoveAfter(const ::DBus::Path& path,
-                                    ::DBus::Error &error) {
+void IPConfigDBusAdaptor::MoveAfter(const ::DBus::Path& /*path*/,
+                                    ::DBus::Error &/*error*/) {
 }
 
 }  // namespace shill
diff --git a/manager_dbus_adaptor.cc b/manager_dbus_adaptor.cc
index 7c071cf..27bba64 100644
--- a/manager_dbus_adaptor.cc
+++ b/manager_dbus_adaptor.cc
@@ -91,32 +91,33 @@
   }
 }
 
-string ManagerDBusAdaptor::GetState(::DBus::Error &error) {
+string ManagerDBusAdaptor::GetState(::DBus::Error &/*error*/) {
   return string();
 }
 
 ::DBus::Path ManagerDBusAdaptor::CreateProfile(const string &name,
-                                               ::DBus::Error &error) {
+                                               ::DBus::Error &/*error*/) {
   NOTIMPLEMENTED();
   // TODO(quiche): implement this
   return ::DBus::Path("/" + name);
 }
 
-void ManagerDBusAdaptor::RemoveProfile(const string &name,
-                                       ::DBus::Error &error) {
+void ManagerDBusAdaptor::RemoveProfile(const string &/*name*/,
+                                       ::DBus::Error &/*error*/) {
 }
 
 ::DBus::Path ManagerDBusAdaptor::PushProfile(const std::string &name,
-                                             ::DBus::Error &error) {
+                                             ::DBus::Error &/*error*/) {
   NOTIMPLEMENTED();
   // TODO(quiche): implement this
   return ::DBus::Path("/" + name);
 }
 
-void ManagerDBusAdaptor::PopProfile(const std::string &, ::DBus::Error &error) {
+void ManagerDBusAdaptor::PopProfile(const std::string &,
+                                    ::DBus::Error &/*error*/) {
 }
 
-void ManagerDBusAdaptor::PopAnyProfile(::DBus::Error &error) {
+void ManagerDBusAdaptor::PopAnyProfile(::DBus::Error &/*error*/) {
 }
 
 void ManagerDBusAdaptor::RequestScan(const string &technology,
@@ -127,11 +128,11 @@
 }
 
 void ManagerDBusAdaptor::EnableTechnology(const string &,
-                                          ::DBus::Error &error) {
+                                          ::DBus::Error &/*error*/) {
 }
 
 void ManagerDBusAdaptor::DisableTechnology(const string &,
-                                           ::DBus::Error &error) {
+                                           ::DBus::Error &/*error*/) {
 }
 
 // deprecated synonym for GetWifiService
@@ -164,36 +165,36 @@
 
 void ManagerDBusAdaptor::ConfigureWifiService(
     const map<string, ::DBus::Variant> &,
-    ::DBus::Error &error) {
+    ::DBus::Error &/*error*/) {
 }
 
 ::DBus::Path ManagerDBusAdaptor::GetVPNService(
     const map<string, ::DBus::Variant> &,
-    ::DBus::Error &error) {
+    ::DBus::Error &/*error*/) {
   return ::DBus::Path();
 }
 
 void ManagerDBusAdaptor::RegisterAgent(const ::DBus::Path &,
-                                       ::DBus::Error &error) {
+                                       ::DBus::Error &/*error*/) {
 }
 
 void ManagerDBusAdaptor::UnregisterAgent(const ::DBus::Path &,
-                                         ::DBus::Error &error) {
+                                         ::DBus::Error &/*error*/) {
 }
 
-int32_t ManagerDBusAdaptor::GetDebugLevel(::DBus::Error &error) {
+int32_t ManagerDBusAdaptor::GetDebugLevel(::DBus::Error &/*error*/) {
   return logging::GetMinLogLevel();
 }
 
 void ManagerDBusAdaptor::SetDebugLevel(const int32_t &level,
-                                      ::DBus::Error &error) {
+                                       ::DBus::Error &/*error*/) {
   if (level < logging::LOG_NUM_SEVERITIES)
     logging::SetMinLogLevel(level);
   else
     LOG(WARNING) << "Ignoring attempt to set log level to " << level;
 }
 
-string ManagerDBusAdaptor::GetServiceOrder(::DBus::Error &error) {
+string ManagerDBusAdaptor::GetServiceOrder(::DBus::Error &/*error*/) {
   return manager_->GetTechnologyOrder();
 }
 
diff --git a/manager_unittest.cc b/manager_unittest.cc
index d50b7aa..f04df5e 100644
--- a/manager_unittest.cc
+++ b/manager_unittest.cc
@@ -207,7 +207,6 @@
   {
     map<string, ::DBus::Variant> props;
     ::DBus::Error dbus_error;
-    bool expected = true;
     DBusAdaptor::GetProperties(manager()->store(), &props, &dbus_error);
     ASSERT_FALSE(props.find(flimflam::kDevicesProperty) == props.end());
     Strings devices =
diff --git a/mock_control.cc b/mock_control.cc
index 852c440..cb72fb7 100644
--- a/mock_control.cc
+++ b/mock_control.cc
@@ -12,23 +12,27 @@
 
 MockControl::~MockControl() {}
 
-DeviceAdaptorInterface *MockControl::CreateDeviceAdaptor(Device *device) {
+DeviceAdaptorInterface *MockControl::CreateDeviceAdaptor(Device */*device*/) {
   return new DeviceMockAdaptor();
 }
 
-IPConfigAdaptorInterface *MockControl::CreateIPConfigAdaptor(IPConfig *config) {
+IPConfigAdaptorInterface *MockControl::CreateIPConfigAdaptor(
+    IPConfig */*config*/) {
   return new IPConfigMockAdaptor();
 }
 
-ManagerAdaptorInterface *MockControl::CreateManagerAdaptor(Manager *manager) {
+ManagerAdaptorInterface *MockControl::CreateManagerAdaptor(
+    Manager */*manager*/) {
   return new ManagerMockAdaptor();
 }
 
-ProfileAdaptorInterface *MockControl::CreateProfileAdaptor(Profile *profile) {
+ProfileAdaptorInterface *MockControl::CreateProfileAdaptor(
+    Profile */*profile*/) {
   return new ProfileMockAdaptor();
 }
 
-ServiceAdaptorInterface *MockControl::CreateServiceAdaptor(Service *service) {
+ServiceAdaptorInterface *MockControl::CreateServiceAdaptor(
+    Service */*service*/) {
   return new ServiceMockAdaptor();
 }
 
diff --git a/modem.cc b/modem.cc
index 0d8c45d..5c5a77c 100644
--- a/modem.cc
+++ b/modem.cc
@@ -140,14 +140,14 @@
 }
 
 void Modem::OnDBusPropertiesChanged(
-    const string &interface,
-    const DBusPropertiesMap &changed_properties,
-    const vector<string> &invalidated_properties) {
+    const string &/*interface*/,
+    const DBusPropertiesMap &/*changed_properties*/,
+    const vector<string> &/*invalidated_properties*/) {
   // Ignored.
 }
 
 void Modem::OnModemManagerPropertiesChanged(
-    const string &interface,
+    const string &/*interface*/,
     const DBusPropertiesMap &properties) {
   if (!device_.get()) {
     return;
diff --git a/modem_manager.cc b/modem_manager.cc
index b1c60a4..090a5b1 100644
--- a/modem_manager.cc
+++ b/modem_manager.cc
@@ -76,7 +76,7 @@
   proxy_.reset();
 }
 
-void ModemManager::OnAppear(GDBusConnection *connection,
+void ModemManager::OnAppear(GDBusConnection */*connection*/,
                             const gchar *name,
                             const gchar *name_owner,
                             gpointer user_data) {
@@ -85,7 +85,7 @@
   manager->Connect(name_owner);
 }
 
-void ModemManager::OnVanish(GDBusConnection *connection,
+void ModemManager::OnVanish(GDBusConnection */*connection*/,
                             const gchar *name,
                             gpointer user_data) {
   LOG(INFO) << "Modem manager " << name << " vanished.";
diff --git a/modem_manager_unittest.cc b/modem_manager_unittest.cc
index c57a0fe..6b415a4 100644
--- a/modem_manager_unittest.cc
+++ b/modem_manager_unittest.cc
@@ -47,9 +47,9 @@
     explicit TestProxyFactory(ModemManagerTest *test) : test_(test) {}
 
     virtual ModemManagerProxyInterface *CreateModemManagerProxy(
-        ModemManager *manager,
-        const string &path,
-        const string &service) {
+        ModemManager */*manager*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->proxy_.release();
     }
 
diff --git a/modem_unittest.cc b/modem_unittest.cc
index 5129776..2ad19c1 100644
--- a/modem_unittest.cc
+++ b/modem_unittest.cc
@@ -67,9 +67,9 @@
     explicit TestProxyFactory(ModemTest *test) : test_(test) {}
 
     virtual DBusPropertiesProxyInterface *CreateDBusPropertiesProxy(
-        DBusPropertiesProxyListener *listener,
-        const string &path,
-        const string &service) {
+        DBusPropertiesProxyListener */*listener*/,
+        const string &/*path*/,
+        const string &/*service*/) {
       return test_->proxy_.release();
     }
 
diff --git a/nice_mock_control.cc b/nice_mock_control.cc
index 09e1917..26d0af4 100644
--- a/nice_mock_control.cc
+++ b/nice_mock_control.cc
@@ -16,27 +16,28 @@
 
 NiceMockControl::~NiceMockControl() {}
 
-DeviceAdaptorInterface *NiceMockControl::CreateDeviceAdaptor(Device *device) {
+DeviceAdaptorInterface *NiceMockControl::CreateDeviceAdaptor(
+    Device */*device*/) {
   return new NiceMock<DeviceMockAdaptor>();
 }
 
 IPConfigAdaptorInterface *NiceMockControl::CreateIPConfigAdaptor(
-    IPConfig *config) {
+    IPConfig */*config*/) {
   return new NiceMock<IPConfigMockAdaptor>();
 }
 
 ManagerAdaptorInterface *NiceMockControl::CreateManagerAdaptor(
-    Manager *manager) {
+    Manager */*manager*/) {
   return new NiceMock<ManagerMockAdaptor>();
 }
 
 ProfileAdaptorInterface *NiceMockControl::CreateProfileAdaptor(
-    Profile *profile) {
+    Profile */*profile*/) {
   return new NiceMock<ProfileMockAdaptor>();
 }
 
 ServiceAdaptorInterface *NiceMockControl::CreateServiceAdaptor(
-    Service *service) {
+    Service */*service*/) {
   return new NiceMock<ServiceMockAdaptor>();
 }
 
diff --git a/profile.cc b/profile.cc
index f905797..b24b80e 100644
--- a/profile.cc
+++ b/profile.cc
@@ -150,7 +150,7 @@
   return true;
 }
 
-bool Profile::Load(StoreInterface *storage) {
+bool Profile::Load(StoreInterface */*storage*/) {
   return false;
 }
 
diff --git a/profile.h b/profile.h
index 45d4396..0b73950 100644
--- a/profile.h
+++ b/profile.h
@@ -111,7 +111,8 @@
   static bool IsValidIdentifierToken(const std::string &token);
 
   // Returns true if |candidate| can be merged into |service|.
-  bool Mergeable(const ServiceRefPtr &service, const ServiceRefPtr &candiate) {
+  bool Mergeable(const ServiceRefPtr &/*service*/,
+                 const ServiceRefPtr &/*candiate*/) {
     return false;
   }
 
diff --git a/profile_dbus_adaptor.cc b/profile_dbus_adaptor.cc
index bad4e68..13b8f59 100644
--- a/profile_dbus_adaptor.cc
+++ b/profile_dbus_adaptor.cc
@@ -71,13 +71,13 @@
 }
 
 map<string, ::DBus::Variant> ProfileDBusAdaptor::GetEntry(
-    const std::string& name,
-    ::DBus::Error &error) {
+    const std::string& /*name*/,
+    ::DBus::Error &/*error*/) {
   return map<string, ::DBus::Variant>();
 }
 
-void ProfileDBusAdaptor::DeleteEntry(const std::string& name,
-                                     ::DBus::Error &error) {
+void ProfileDBusAdaptor::DeleteEntry(const std::string& /*name*/,
+                                     ::DBus::Error &/*error*/) {
 }
 
 }  // namespace shill
diff --git a/property_accessor.h b/property_accessor.h
index 4ec3a2a..fda0623 100644
--- a/property_accessor.h
+++ b/property_accessor.h
@@ -53,7 +53,7 @@
   virtual ~ConstPropertyAccessor() {}
 
   const T &Get() { return *property_; }
-  bool Set(const T &value) { return false; }
+  bool Set(const T &/*value*/) { return false; }
 
  private:
   const T * const property_;
diff --git a/routing_table_unittest.cc b/routing_table_unittest.cc
index 544ae4d..497e660 100644
--- a/routing_table_unittest.cc
+++ b/routing_table_unittest.cc
@@ -27,8 +27,8 @@
 class TestEventDispatcher : public EventDispatcher {
  public:
   virtual IOInputHandler *CreateInputHandler(
-      int fd,
-      Callback1<InputData*>::Type *callback) {
+      int /*fd*/,
+      Callback1<InputData*>::Type */*callback*/) {
     return NULL;
   }
 };
diff --git a/rtnl_handler_unittest.cc b/rtnl_handler_unittest.cc
index 7e52bab..e615104 100644
--- a/rtnl_handler_unittest.cc
+++ b/rtnl_handler_unittest.cc
@@ -43,8 +43,8 @@
 class TestEventDispatcher : public EventDispatcher {
  public:
   virtual IOInputHandler *CreateInputHandler(
-      int fd,
-      Callback1<InputData*>::Type *callback) {
+      int /*fd*/,
+      Callback1<InputData*>::Type */*callback*/) {
     return NULL;
   }
 };
diff --git a/rtnl_message_unittest.cc b/rtnl_message_unittest.cc
index 1657bb1..1f8d55f 100644
--- a/rtnl_message_unittest.cc
+++ b/rtnl_message_unittest.cc
@@ -417,7 +417,7 @@
   }
 
   void TestParseRoute(const ByteString &packet,
-                      RTNLMessage::Mode mode,
+                      RTNLMessage::Mode /*mode*/,
                       IPAddress::Family family,
                       int interface_index,
                       const IPAddress &dst,
diff --git a/service.cc b/service.cc
index 4a5f967..489fe5c 100644
--- a/service.cc
+++ b/service.cc
@@ -158,14 +158,15 @@
 
 Service::~Service() {}
 
-void Service::ActivateCellularModem(const std::string &carrier, Error *error) {
+void Service::ActivateCellularModem(const std::string &/*carrier*/,
+                                    Error *error) {
   const string kMessage = "Service doesn't support cellular modem activation.";
   LOG(ERROR) << kMessage;
   CHECK(error);
   error->Populate(Error::kInvalidArguments, kMessage);
 }
 
-bool Service::TechnologyIs(const Technology::Identifier type) const {
+bool Service::TechnologyIs(const Technology::Identifier /*type*/) const {
   return false;
 }
 
diff --git a/service_dbus_adaptor.cc b/service_dbus_adaptor.cc
index e64e2f5..f151f01 100644
--- a/service_dbus_adaptor.cc
+++ b/service_dbus_adaptor.cc
@@ -64,7 +64,8 @@
   DBusAdaptor::DispatchOnType(service_->mutable_store(), name, value, &error);
 }
 
-void ServiceDBusAdaptor::ClearProperty(const string& , ::DBus::Error &error) {
+void ServiceDBusAdaptor::ClearProperty(const string& ,
+                                       ::DBus::Error &/*error*/) {
 }
 
 void ServiceDBusAdaptor::Connect(::DBus::Error &error) {
@@ -73,18 +74,18 @@
   e.ToDBusError(&error);
 }
 
-void ServiceDBusAdaptor::Disconnect(::DBus::Error &error) {
+void ServiceDBusAdaptor::Disconnect(::DBus::Error &/*error*/) {
 }
 
-void ServiceDBusAdaptor::Remove(::DBus::Error &error) {
+void ServiceDBusAdaptor::Remove(::DBus::Error &/*error*/) {
 }
 
 void ServiceDBusAdaptor::MoveBefore(const ::DBus::Path& ,
-                                    ::DBus::Error &error) {
+                                    ::DBus::Error &/*error*/) {
 }
 
 void ServiceDBusAdaptor::MoveAfter(const ::DBus::Path& ,
-                                   ::DBus::Error &error) {
+                                   ::DBus::Error &/*error*/) {
 }
 
 void ServiceDBusAdaptor::ActivateCellularModem(const string &carrier,
diff --git a/service_unittest.cc b/service_unittest.cc
index efbd149..860c13c 100644
--- a/service_unittest.cc
+++ b/service_unittest.cc
@@ -8,8 +8,8 @@
 #include <string>
 #include <vector>
 
-#include <dbus-c++/dbus.h>
 #include <chromeos/dbus/service_constants.h>
+#include <dbus-c++/dbus.h>
 #include <gtest/gtest.h>
 #include <gmock/gmock.h>
 
@@ -48,7 +48,7 @@
       : Service(control_interface, dispatcher, manager, "stub") {}
   virtual ~ServiceUnderTest() {}
 
-  virtual void Connect(Error *error) {}
+  virtual void Connect(Error */*error*/) {}
   virtual void Disconnect() {}
   virtual string CalculateState() { return ""; }
   virtual string GetRpcIdentifier() const { return ServiceMockAdaptor::kRpcId; }
diff --git a/supplicant_interface_proxy.cc b/supplicant_interface_proxy.cc
index 64dbc1c..ebc5db0 100644
--- a/supplicant_interface_proxy.cc
+++ b/supplicant_interface_proxy.cc
@@ -58,12 +58,12 @@
 
 SupplicantInterfaceProxy::Proxy::~Proxy() {}
 
-void SupplicantInterfaceProxy::Proxy::BlobAdded(const string &blobname) {
+void SupplicantInterfaceProxy::Proxy::BlobAdded(const string &/*blobname*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
-void SupplicantInterfaceProxy::Proxy::BlobRemoved(const string &blobname) {
+void SupplicantInterfaceProxy::Proxy::BlobRemoved(const string &/*blobname*/) {
   LOG(INFO) << __func__;
   // XXX
 }
@@ -75,32 +75,32 @@
   wifi_->BSSAdded(BSS, properties);
 }
 
-void SupplicantInterfaceProxy::Proxy::BSSRemoved(const ::DBus::Path &BSS) {
+void SupplicantInterfaceProxy::Proxy::BSSRemoved(const ::DBus::Path &/*BSS*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantInterfaceProxy::Proxy::NetworkAdded(
-    const ::DBus::Path &network,
-    const std::map<string, ::DBus::Variant> &properties) {
+    const ::DBus::Path &/*network*/,
+    const std::map<string, ::DBus::Variant> &/*properties*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantInterfaceProxy::Proxy::NetworkRemoved(
-    const ::DBus::Path &network) {
+    const ::DBus::Path &/*network*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantInterfaceProxy::Proxy::NetworkSelected(
-    const ::DBus::Path &network) {
+    const ::DBus::Path &/*network*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantInterfaceProxy::Proxy::PropertiesChanged(
-    const std::map<string, ::DBus::Variant> &properties) {
+    const std::map<string, ::DBus::Variant> &/*properties*/) {
   LOG(INFO) << __func__;
   // XXX
 }
diff --git a/supplicant_process_proxy.cc b/supplicant_process_proxy.cc
index c523acb..47d6a51 100644
--- a/supplicant_process_proxy.cc
+++ b/supplicant_process_proxy.cc
@@ -44,20 +44,20 @@
 SupplicantProcessProxy::Proxy::~Proxy() {}
 
 void SupplicantProcessProxy::Proxy::InterfaceAdded(
-    const ::DBus::Path& path,
-    const map<string, ::DBus::Variant> &properties) {
+    const ::DBus::Path& /*path*/,
+    const map<string, ::DBus::Variant> &/*properties*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantProcessProxy::Proxy::InterfaceRemoved(
-    const ::DBus::Path& path) {
+    const ::DBus::Path& /*path*/) {
   LOG(INFO) << __func__;
   // XXX
 }
 
 void SupplicantProcessProxy::Proxy::PropertiesChanged(
-    const map<string, ::DBus::Variant>& properties) {
+    const map<string, ::DBus::Variant>& /*properties*/) {
   LOG(INFO) << __func__;
   // XXX
 }
diff --git a/wifi.cc b/wifi.cc
index 17a371a..f11a517 100644
--- a/wifi.cc
+++ b/wifi.cc
@@ -178,7 +178,7 @@
           << " ServiceMap entries.";
 }
 
-void WiFi::Scan(Error *error) {
+void WiFi::Scan(Error */*error*/) {
   LOG(INFO) << __func__;
 
   // needs to send a D-Bus message, but may be called from D-Bus
@@ -214,7 +214,7 @@
 }
 
 void WiFi::BSSAdded(
-    const ::DBus::Path &BSS,
+    const ::DBus::Path &/*BSS*/,
     const std::map<string, ::DBus::Variant> &properties) {
   // TODO(quiche): write test to verify correct behavior in the case
   // where we get multiple BSSAdded events for a single endpoint.
diff --git a/wifi_service.cc b/wifi_service.cc
index cba5a2a..881bf1d 100644
--- a/wifi_service.cc
+++ b/wifi_service.cc
@@ -64,7 +64,7 @@
   LOG(INFO) << __func__;
 }
 
-void WiFiService::Connect(Error *error) {
+void WiFiService::Connect(Error */*error*/) {
   LOG(INFO) << __func__;
 
   // NB(quiche) defer handling, since dbus-c++ does not permit us to
diff --git a/wifi_unittest.cc b/wifi_unittest.cc
index 2751eb8..dae7dad 100644
--- a/wifi_unittest.cc
+++ b/wifi_unittest.cc
@@ -16,8 +16,8 @@
 #include <base/memory/scoped_ptr.h>
 #include <base/string_number_conversions.h>
 #include <base/string_util.h>
-#include <dbus-c++/dbus.h>
 #include <chromeos/dbus/service_constants.h>
+#include <dbus-c++/dbus.h>
 #include <gmock/gmock.h>
 #include <gtest/gtest.h>
 
@@ -145,14 +145,14 @@
     explicit TestProxyFactory(WiFiMainTest *test) : test_(test) {}
 
     virtual SupplicantProcessProxyInterface *CreateSupplicantProcessProxy(
-        const char *dbus_path, const char *dbus_addr) {
+        const char */*dbus_path*/, const char */*dbus_addr*/) {
       return test_->supplicant_process_proxy_.release();
     }
 
     virtual SupplicantInterfaceProxyInterface *CreateSupplicantInterfaceProxy(
-        const WiFiRefPtr &wifi,
-        const DBus::Path &object_path,
-        const char *dbus_addr) {
+        const WiFiRefPtr &/*wifi*/,
+        const DBus::Path &/*object_path*/,
+        const char */*dbus_addr*/) {
       return test_->supplicant_interface_proxy_.release();
     }