Merge lp:~thomas-voss/location-service/fix-build-warnings into lp:location-service/trunk

Proposed by Thomas Voß
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 75
Merged at revision: 77
Proposed branch: lp:~thomas-voss/location-service/fix-build-warnings
Merge into: lp:location-service/trunk
Prerequisite: lp:~thomas-voss/location-service/fix-1349704
Diff against target: 265 lines (+30/-24)
10 files modified
src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h (+7/-1)
src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h (+4/-4)
src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp (+4/-4)
src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h (+2/-2)
src/location_service/com/ubuntu/location/service/daemon.cpp (+2/-2)
src/location_service/com/ubuntu/location/service/daemon.h (+2/-2)
src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp (+1/-1)
src/location_service/com/ubuntu/location/service/daemon_main.cpp (+1/-1)
src/location_service/com/ubuntu/location/service/skeleton.cpp (+2/-2)
tests/daemon_and_cli_tests.cpp (+5/-5)
To merge this branch: bzr merge lp:~thomas-voss/location-service/fix-build-warnings
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Needs Fixing
Manuel de la Peña (community) Approve
Pete Woods Pending
Review via email: mp+228654@code.launchpad.net

This proposal supersedes a proposal from 2014-07-29.

Commit message

Fix build warnings.

Description of the change

Fix build warnings.

To post a comment you must log in.
Revision history for this message
Manuel de la Peña (mandel) :
review: Approve
75. By Thomas Voß

Merge in prerequisite branch.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h'
--- src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h 2014-06-10 11:53:01 +0000
+++ src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h 2014-07-29 11:33:44 +0000
@@ -22,7 +22,7 @@
2222
23#include "ofono.h"23#include "ofono.h"
2424
25namespace25namespace detail
26{26{
2727
28struct CachedRadioCell : public com::ubuntu::location::connectivity::RadioCell28struct CachedRadioCell : public com::ubuntu::location::connectivity::RadioCell
@@ -259,6 +259,8 @@
259 detail.lte.strength.reset();259 detail.lte.strength.reset();
260 detail.lte.id.reset();260 detail.lte.id.reset();
261 break;261 break;
262 default:
263 break;
262 }264 }
263 break;265 break;
264 case com::ubuntu::location::connectivity::RadioCell::Type::umts:266 case com::ubuntu::location::connectivity::RadioCell::Type::umts:
@@ -278,6 +280,8 @@
278 detail.lte.strength.reset();280 detail.lte.strength.reset();
279 detail.lte.id.reset();281 detail.lte.id.reset();
280 break;282 break;
283 default:
284 break;
281 }285 }
282 break;286 break;
283 case com::ubuntu::location::connectivity::RadioCell::Type::lte:287 case com::ubuntu::location::connectivity::RadioCell::Type::lte:
@@ -297,6 +301,8 @@
297 detail.umts.strength.reset();301 detail.umts.strength.reset();
298 detail.umts.id.reset();302 detail.umts.id.reset();
299 break;303 break;
304 default:
305 break;
300 }306 }
301 default:307 default:
302 break;308 break;
303309
=== modified file 'src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h'
--- src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h 2014-06-12 20:00:33 +0000
+++ src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h 2014-07-29 11:33:44 +0000
@@ -24,7 +24,7 @@
2424
25#include "nm.h"25#include "nm.h"
2626
27namespace27namespace detail
28{28{
29std::string utf8_ssid_to_string(const org::freedesktop::NetworkManager::AccessPoint::Ssid::ValueType& ssid)29std::string utf8_ssid_to_string(const org::freedesktop::NetworkManager::AccessPoint::Ssid::ValueType& ssid)
30{30{
@@ -111,11 +111,11 @@
111 mode_ = wifi_mode_from_ap_mode(access_point_.mode->get());111 mode_ = wifi_mode_from_ap_mode(access_point_.mode->get());
112 frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency112 frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency
113 {113 {
114 access_point_.frequency->get()114 static_cast<int>(access_point_.frequency->get())
115 };115 };
116 signal_strength_ = com::ubuntu::location::connectivity::WirelessNetwork::SignalStrength116 signal_strength_ = com::ubuntu::location::connectivity::WirelessNetwork::SignalStrength
117 {117 {
118 int(access_point_.strength->get())118 static_cast<int>(access_point_.strength->get())
119 };119 };
120120
121 // Wire up all the connections121 // Wire up all the connections
@@ -160,7 +160,7 @@
160 {160 {
161 thiz.frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency161 thiz.frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency
162 {162 {
163 value.as<org::freedesktop::NetworkManager::AccessPoint::Frequency::ValueType>()163 static_cast<int>(value.as<org::freedesktop::NetworkManager::AccessPoint::Frequency::ValueType>())
164 };164 };
165 }165 }
166 },166 },
167167
=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp'
--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2014-06-10 09:08:10 +0000
+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2014-07-29 11:33:44 +0000
@@ -196,7 +196,7 @@
196 });196 });
197197
198 // And update our cache of modems and registered cells.198 // And update our cache of modems and registered cells.
199 auto cell = std::make_shared<CachedRadioCell>(modem);199 auto cell = std::make_shared<detail::CachedRadioCell>(modem);
200 {200 {
201 std::lock_guard<std::mutex> lg(cached.guard);201 std::lock_guard<std::mutex> lg(cached.guard);
202 cached.modems.insert(std::make_pair(modem.object->path(), modem));202 cached.modems.insert(std::make_pair(modem.object->path(), modem));
@@ -209,7 +209,7 @@
209209
210void impl::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)210void impl::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)
211{211{
212 CachedRadioCell::Ptr cell;212 detail::CachedRadioCell::Ptr cell;
213 {213 {
214 std::lock_guard<std::mutex> lg(cached.guard);214 std::lock_guard<std::mutex> lg(cached.guard);
215215
@@ -269,7 +269,7 @@
269 {269 {
270 // A new network registration is coming in and we have to create270 // A new network registration is coming in and we have to create
271 // a corresponding cell instance.271 // a corresponding cell instance.
272 auto cell = std::make_shared<CachedRadioCell>(itm->second);272 auto cell = std::make_shared<detail::CachedRadioCell>(itm->second);
273 cached.cells.insert(std::make_pair(path,cell));273 cached.cells.insert(std::make_pair(path,cell));
274 // Cache is up to date now and we announce the new cell to274 // Cache is up to date now and we announce the new cell to
275 // API customers, with the lock on the cache not being held.275 // API customers, with the lock on the cache not being held.
@@ -370,7 +370,7 @@
370 network_manager->service->add_object_for_path(ap_path)370 network_manager->service->add_object_for_path(ap_path)
371 };371 };
372372
373 auto wifi = std::make_shared<CachedWirelessNetwork>(itd->second, ap);373 auto wifi = std::make_shared<detail::CachedWirelessNetwork>(itd->second, ap);
374 cached.wifis[ap_path] = wifi;374 cached.wifis[ap_path] = wifi;
375375
376 // Let API consumers know that an AP appeared. The lock on the cache is376 // Let API consumers know that an AP appeared. The lock on the cache is
377377
=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h'
--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h 2014-06-10 09:08:10 +0000
+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h 2014-07-29 11:33:44 +0000
@@ -91,9 +91,9 @@
91 struct91 struct
92 {92 {
93 mutable std::mutex guard;93 mutable std::mutex guard;
94 std::map<core::dbus::types::ObjectPath, CachedRadioCell::Ptr> cells;94 std::map<core::dbus::types::ObjectPath, detail::CachedRadioCell::Ptr> cells;
95 std::map<core::dbus::types::ObjectPath, org::Ofono::Manager::Modem> modems;95 std::map<core::dbus::types::ObjectPath, org::Ofono::Manager::Modem> modems;
96 std::map<core::dbus::types::ObjectPath, CachedWirelessNetwork::Ptr> wifis;96 std::map<core::dbus::types::ObjectPath, detail::CachedWirelessNetwork::Ptr> wifis;
97 std::map<core::dbus::types::ObjectPath, org::freedesktop::NetworkManager::Device> wireless_devices;97 std::map<core::dbus::types::ObjectPath, org::freedesktop::NetworkManager::Device> wireless_devices;
98 } cached;98 } cached;
9999
100100
=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
--- src/location_service/com/ubuntu/location/service/daemon.cpp 2014-06-23 04:57:59 +0000
+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2014-07-29 11:33:44 +0000
@@ -86,7 +86,7 @@
8686
87location::service::Daemon::Configuration location::service::Daemon::Configuration::from_command_line_args(87location::service::Daemon::Configuration location::service::Daemon::Configuration::from_command_line_args(
88 int argc,88 int argc,
89 char** argv,89 const char** argv,
90 location::service::Daemon::DBusConnectionFactory factory)90 location::service::Daemon::DBusConnectionFactory factory)
91{91{
92 location::service::Daemon::Configuration result;92 location::service::Daemon::Configuration result;
@@ -256,7 +256,7 @@
256256
257location::service::Daemon::Cli::Configuration location::service::Daemon::Cli::Configuration::from_command_line_args(257location::service::Daemon::Cli::Configuration location::service::Daemon::Cli::Configuration::from_command_line_args(
258 int argc,258 int argc,
259 char** argv,259 const char** argv,
260 location::service::Daemon::DBusConnectionFactory factory)260 location::service::Daemon::DBusConnectionFactory factory)
261{261{
262 location::service::Daemon::Cli::Configuration result;262 location::service::Daemon::Cli::Configuration result;
263263
=== modified file 'src/location_service/com/ubuntu/location/service/daemon.h'
--- src/location_service/com/ubuntu/location/service/daemon.h 2014-06-23 04:57:59 +0000
+++ src/location_service/com/ubuntu/location/service/daemon.h 2014-07-29 11:33:44 +0000
@@ -102,7 +102,7 @@
102 */102 */
103 static Configuration from_command_line_args(103 static Configuration from_command_line_args(
104 int argc,104 int argc,
105 char** argv,105 const char** argv,
106 DBusConnectionFactory factory = default_dbus_connection_factory());106 DBusConnectionFactory factory = default_dbus_connection_factory());
107107
108 /** @brief The bus to connect to. */108 /** @brief The bus to connect to. */
@@ -148,7 +148,7 @@
148 */148 */
149 static Configuration from_command_line_args(149 static Configuration from_command_line_args(
150 int argc,150 int argc,
151 char** argv,151 const char** argv,
152 DBusConnectionFactory factory = default_dbus_connection_factory());152 DBusConnectionFactory factory = default_dbus_connection_factory());
153153
154 /** @brief The bus to expose the service upon. */154 /** @brief The bus to expose the service upon. */
155155
=== modified file 'src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp'
--- src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp 2014-06-27 07:20:19 +0000
+++ src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp 2014-07-29 11:33:44 +0000
@@ -25,7 +25,7 @@
2525
26namespace location = com::ubuntu::location;26namespace location = com::ubuntu::location;
2727
28int main(int argc, char** argv)28int main(int argc, const char** argv)
29{29{
30 // Setup logging for the CLI.30 // Setup logging for the CLI.
31 FLAGS_logtostderr = true;31 FLAGS_logtostderr = true;
3232
=== modified file 'src/location_service/com/ubuntu/location/service/daemon_main.cpp'
--- src/location_service/com/ubuntu/location/service/daemon_main.cpp 2014-07-29 11:33:44 +0000
+++ src/location_service/com/ubuntu/location/service/daemon_main.cpp 2014-07-29 11:33:44 +0000
@@ -30,7 +30,7 @@
30constexpr const char* log_dir{"/var/log/ubuntu-location-service"};30constexpr const char* log_dir{"/var/log/ubuntu-location-service"};
31}31}
3232
33int main(int argc, char** argv)33int main(int argc, const char** argv)
34{34{
35 // Setup logging for the daemon.35 // Setup logging for the daemon.
36 boost::system::error_code ec;36 boost::system::error_code ec;
3737
=== modified file 'src/location_service/com/ubuntu/location/service/skeleton.cpp'
--- src/location_service/com/ubuntu/location/service/skeleton.cpp 2014-06-24 08:35:08 +0000
+++ src/location_service/com/ubuntu/location/service/skeleton.cpp 2014-07-29 11:33:44 +0000
@@ -46,8 +46,8 @@
46{46{
47 return culs::Credentials47 return culs::Credentials
48 {48 {
49 daemon.get_connection_unix_process_id(msg->sender()),49 static_cast<pid_t>(daemon.get_connection_unix_process_id(msg->sender())),
50 daemon.get_connection_unix_user(msg->sender())50 static_cast<uid_t>(daemon.get_connection_unix_user(msg->sender()))
51 };51 };
52}52}
5353
5454
=== modified file 'tests/daemon_and_cli_tests.cpp'
--- tests/daemon_and_cli_tests.cpp 2014-06-23 04:57:59 +0000
+++ tests/daemon_and_cli_tests.cpp 2014-07-29 11:33:44 +0000
@@ -191,7 +191,7 @@
191}191}
192TEST(DaemonCli, CommandLineArgsParsingWorksForCorrectArguments)192TEST(DaemonCli, CommandLineArgsParsingWorksForCorrectArguments)
193{193{
194 char* args[] =194 const char* args[] =
195 {195 {
196 "--bus", "session",196 "--bus", "session",
197 "--get",197 "--get",
@@ -206,7 +206,7 @@
206206
207TEST(DaemonCli, CommandLineArgsParsingThrowsForInvalidArguments)207TEST(DaemonCli, CommandLineArgsParsingThrowsForInvalidArguments)
208{208{
209 char* args[] =209 const char* args[] =
210 {210 {
211 "--bus", "session",211 "--bus", "session",
212 "--get", "--set", // Both get and set specificed, expected to throw212 "--get", "--set", // Both get and set specificed, expected to throw
@@ -218,7 +218,7 @@
218218
219TEST(Daemon, CommandLineParsingThrowsForEmptyProviders)219TEST(Daemon, CommandLineParsingThrowsForEmptyProviders)
220{220{
221 char* args[] =221 const char* args[] =
222 {222 {
223 "--bus", "session"223 "--bus", "session"
224 };224 };
@@ -228,7 +228,7 @@
228228
229TEST(Daemon, CommandLineParsingDoesNotThrowForEmptyProvidersInTesting)229TEST(Daemon, CommandLineParsingDoesNotThrowForEmptyProvidersInTesting)
230{230{
231 char* args[] =231 const char* args[] =
232 {232 {
233 "--bus", "session",233 "--bus", "session",
234 "--testing"234 "--testing"
@@ -239,7 +239,7 @@
239239
240TEST(Daemon, CommandLineParsingWorksForProvidersAndProviderOptions)240TEST(Daemon, CommandLineParsingWorksForProvidersAndProviderOptions)
241{241{
242 char* args[] =242 const char* args[] =
243 {243 {
244 "--bus", "session",244 "--bus", "session",
245 "--provider", "does::not::exist::Provider",245 "--provider", "does::not::exist::Provider",

Subscribers

People subscribed via source and target branches