diff options
author | Alex Vakulenko <avakulenko@google.com> | 2016-02-24 21:46:53 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2016-02-24 21:46:53 +0000 |
commit | dd7857cb6dad2890a266b566083e66d9312b1bf3 (patch) | |
tree | 169ab44f44a2e4f73ec8cd122747369ff273545d | |
parent | 0ed4afd807dad4703af42b752dacf02c8503c854 (diff) | |
parent | 0ee8bad1584f09092d9b86322d2f130b36fd73e1 (diff) | |
download | weaved-dd7857cb6dad2890a266b566083e66d9312b1bf3.tar.gz |
weaved: Re-enabled all compiler warnings am: ca33240b81
am: 0ee8bad158
* commit '0ee8bad1584f09092d9b86322d2f130b36fd73e1':
weaved: Re-enabled all compiler warnings
-rw-r--r-- | Android.mk | 12 | ||||
-rw-r--r-- | buffet/avahi_mdns_client.cc | 6 | ||||
-rw-r--r-- | buffet/buffet_config.h | 1 | ||||
-rw-r--r-- | buffet/flouride_socket_bluetooth_client.cc | 2 | ||||
-rw-r--r-- | buffet/http_transport_client.cc | 4 | ||||
-rw-r--r-- | buffet/main.cc | 2 | ||||
-rw-r--r-- | buffet/mdns_client.h | 7 | ||||
-rw-r--r-- | buffet/shill_client.cc | 22 | ||||
-rw-r--r-- | buffet/socket_stream.cc | 2 |
9 files changed, 28 insertions, 30 deletions
@@ -18,15 +18,9 @@ LOCAL_PATH := $(call my-dir) # ======================================================== buffetCommonCppExtension := .cc -buffetCommonCFlags := -DBUFFET_USE_WIFI_BOOTSTRAPPING -Wall -Werror \ - -Wno-char-subscripts -Wno-missing-field-initializers \ - -Wno-unused-function -Wno-unused-parameter \ - -buffetCommonCppFlags := \ - -Wno-deprecated-register \ - -Wno-sign-compare \ - -Wno-sign-promo \ - -Wno-non-virtual-dtor \ +buffetCommonCFlags := -DBUFFET_USE_WIFI_BOOTSTRAPPING -Wall -Wextra -Werror + +buffetCommonCppFlags := buffetCommonCIncludes := \ $(LOCAL_PATH)/.. \ diff --git a/buffet/avahi_mdns_client.cc b/buffet/avahi_mdns_client.cc index c60b727..a53c567 100644 --- a/buffet/avahi_mdns_client.cc +++ b/buffet/avahi_mdns_client.cc @@ -36,7 +36,7 @@ std::unique_ptr<MdnsClient> MdnsClient::CreateInstance() { namespace { -void HandleGroupStateChanged(AvahiEntryGroup* g, +void HandleGroupStateChanged(AVAHI_GCC_UNUSED AvahiEntryGroup* g, AvahiEntryGroupState state, AVAHI_GCC_UNUSED void* userdata) { if (state == AVAHI_ENTRY_GROUP_COLLISION || @@ -125,7 +125,7 @@ void AvahiMdnsClient::PublishService(const std::string& service_type, } } -void AvahiMdnsClient::StopPublishing(const std::string& service_type) { +void AvahiMdnsClient::StopPublishing(const std::string& /*service_type*/) { CHECK(group_); avahi_entry_group_reset(group_.get()); prev_service_type_.clear(); @@ -133,7 +133,7 @@ void AvahiMdnsClient::StopPublishing(const std::string& service_type) { txt_records_.clear(); } -void AvahiMdnsClient::OnAvahiClientStateUpdate(AvahiClient* s, +void AvahiMdnsClient::OnAvahiClientStateUpdate(AvahiClient* /*s*/, AvahiClientState state, void* userdata) { // Avahi service has been re-initialized (probably due to host name conflict), diff --git a/buffet/buffet_config.h b/buffet/buffet_config.h index 17328fe..90235a6 100644 --- a/buffet/buffet_config.h +++ b/buffet/buffet_config.h @@ -48,6 +48,7 @@ class BuffetConfig final : public weave::provider::ConfigStore { // An IO abstraction to enable testing without using real files. class FileIO { public: + virtual ~FileIO() = default; virtual bool ReadFile(const base::FilePath& path, std::string* content) = 0; virtual bool WriteFile(const base::FilePath& path, const std::string& content) = 0; diff --git a/buffet/flouride_socket_bluetooth_client.cc b/buffet/flouride_socket_bluetooth_client.cc index d6090dd..79a439b 100644 --- a/buffet/flouride_socket_bluetooth_client.cc +++ b/buffet/flouride_socket_bluetooth_client.cc @@ -43,7 +43,7 @@ bool FlourideSocketBluetoothClient::OpenSocket() { return false; } - sockaddr_un addr{AF_UNIX}; + sockaddr_un addr{AF_UNIX, {}}; static_assert(sizeof(kFlourideSocketPath) <= sizeof(addr.sun_path), "kFlourideSocketPath too long"); strncpy(addr.sun_path, kFlourideSocketPath, sizeof(addr.sun_path)); diff --git a/buffet/http_transport_client.cc b/buffet/http_transport_client.cc index da54b50..b4b5c85 100644 --- a/buffet/http_transport_client.cc +++ b/buffet/http_transport_client.cc @@ -55,7 +55,7 @@ class ResponseImpl : public HttpClient::Response { }; void OnSuccessCallback(const HttpClient::SendRequestCallback& callback, - int id, + int /*id*/, std::unique_ptr<brillo::http::Response> response) { callback.Run(std::unique_ptr<HttpClient::Response>{new ResponseImpl{ std::move(response)}}, @@ -63,7 +63,7 @@ void OnSuccessCallback(const HttpClient::SendRequestCallback& callback, } void OnErrorCallback(const HttpClient::SendRequestCallback& callback, - int id, + int /*id*/, const brillo::Error* brillo_error) { weave::ErrorPtr error; ConvertError(*brillo_error, &error); diff --git a/buffet/main.cc b/buffet/main.cc index 29bd7de..0120d75 100644 --- a/buffet/main.cc +++ b/buffet/main.cc @@ -61,7 +61,7 @@ class Daemon final : public DBusServiceDaemon { manager_->Start(sequencer); } - void OnShutdown(int* return_code) override { manager_->Stop(); } + void OnShutdown(int* /*return_code*/) override { manager_->Stop(); } private: Manager::Options options_; diff --git a/buffet/mdns_client.h b/buffet/mdns_client.h index 6a04882..0a7690a 100644 --- a/buffet/mdns_client.h +++ b/buffet/mdns_client.h @@ -35,9 +35,10 @@ class MdnsClient : public weave::provider::DnsServiceDiscovery { ~MdnsClient() override = default; // weave::provider::DnsServiceDiscovery implementation. - void PublishService(const std::string& service_type, uint16_t port, - const std::vector<std::string>& txt) override {} - void StopPublishing(const std::string& service_type) override {} + void PublishService(const std::string& /*service_type*/, + uint16_t /*port*/, + const std::vector<std::string>& /*txt*/) override {} + void StopPublishing(const std::string& /*service_type*/) override {} static std::unique_ptr<MdnsClient> CreateInstance(); diff --git a/buffet/shill_client.cc b/buffet/shill_client.cc index 1e97246..88fbc84 100644 --- a/buffet/shill_client.cc +++ b/buffet/shill_client.cc @@ -233,7 +233,7 @@ bool ShillClient::IsMonitoredDevice(DeviceProxy* device) { return ContainsKey(device_whitelist_, it->second.TryGet<string>()); } -void ShillClient::OnShillServiceOwnerChange(const string& old_owner, +void ShillClient::OnShillServiceOwnerChange(const string& /*old_owner*/, const string& new_owner) { VLOG(1) << "Shill service owner name changed to '" << new_owner << "'"; if (new_owner.empty()) { @@ -245,9 +245,10 @@ void ShillClient::OnShillServiceOwnerChange(const string& old_owner, } } -void ShillClient::OnManagerPropertyChangeRegistration(const string& interface, - const string& signal_name, - bool success) { +void ShillClient::OnManagerPropertyChangeRegistration( + const string& /*interface*/, + const string& /*signal_name*/, + bool success) { VLOG(3) << "Registered ManagerPropertyChange handler."; CHECK(success) << "privetd requires Manager signals."; VariantDictionary properties; @@ -310,8 +311,8 @@ void ShillClient::OnManagerPropertyChange(const string& property_name, void ShillClient::OnDevicePropertyChangeRegistration( const ObjectPath& device_path, - const string& interface, - const string& signal_name, + const string& /*interface*/, + const string& /*signal_name*/, bool success) { VLOG(3) << "Registered DevicePropertyChange handler."; auto it = devices_.find(device_path); @@ -416,10 +417,11 @@ void ShillClient::OnDevicePropertyChange(const ObjectPath& device_path, } } -void ShillClient::OnServicePropertyChangeRegistration(const ObjectPath& path, - const string& interface, - const string& signal_name, - bool success) { +void ShillClient::OnServicePropertyChangeRegistration( + const ObjectPath& path, + const string& /*interface*/, + const string& /*signal_name*/, + bool success) { VLOG(3) << "OnServicePropertyChangeRegistration(" << path.value() << ");"; ServiceProxy* service{nullptr}; if (connecting_service_ && connecting_service_->GetObjectPath() == path) { diff --git a/buffet/socket_stream.cc b/buffet/socket_stream.cc index 19a1e5f..7ffffda 100644 --- a/buffet/socket_stream.cc +++ b/buffet/socket_stream.cc @@ -65,7 +65,7 @@ std::string GetIPAddress(const sockaddr* sa) { int ConnectSocket(const std::string& host, uint16_t port) { std::string service = std::to_string(port); - addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM}; + addrinfo hints = {0, AF_UNSPEC, SOCK_STREAM, 0, 0, nullptr, nullptr, nullptr}; addrinfo* result = nullptr; if (getaddrinfo(host.c_str(), service.c_str(), &hints, &result)) { PLOG(WARNING) << "Failed to resolve host name: " << host; |