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
1=== modified file 'src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h'
2--- src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h 2014-06-10 11:53:01 +0000
3+++ src/location_service/com/ubuntu/location/connectivity/cached_radio_cell.h 2014-07-29 11:33:44 +0000
4@@ -22,7 +22,7 @@
5
6 #include "ofono.h"
7
8-namespace
9+namespace detail
10 {
11
12 struct CachedRadioCell : public com::ubuntu::location::connectivity::RadioCell
13@@ -259,6 +259,8 @@
14 detail.lte.strength.reset();
15 detail.lte.id.reset();
16 break;
17+ default:
18+ break;
19 }
20 break;
21 case com::ubuntu::location::connectivity::RadioCell::Type::umts:
22@@ -278,6 +280,8 @@
23 detail.lte.strength.reset();
24 detail.lte.id.reset();
25 break;
26+ default:
27+ break;
28 }
29 break;
30 case com::ubuntu::location::connectivity::RadioCell::Type::lte:
31@@ -297,6 +301,8 @@
32 detail.umts.strength.reset();
33 detail.umts.id.reset();
34 break;
35+ default:
36+ break;
37 }
38 default:
39 break;
40
41=== modified file 'src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h'
42--- src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h 2014-06-12 20:00:33 +0000
43+++ src/location_service/com/ubuntu/location/connectivity/cached_wireless_network.h 2014-07-29 11:33:44 +0000
44@@ -24,7 +24,7 @@
45
46 #include "nm.h"
47
48-namespace
49+namespace detail
50 {
51 std::string utf8_ssid_to_string(const org::freedesktop::NetworkManager::AccessPoint::Ssid::ValueType& ssid)
52 {
53@@ -111,11 +111,11 @@
54 mode_ = wifi_mode_from_ap_mode(access_point_.mode->get());
55 frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency
56 {
57- access_point_.frequency->get()
58+ static_cast<int>(access_point_.frequency->get())
59 };
60 signal_strength_ = com::ubuntu::location::connectivity::WirelessNetwork::SignalStrength
61 {
62- int(access_point_.strength->get())
63+ static_cast<int>(access_point_.strength->get())
64 };
65
66 // Wire up all the connections
67@@ -160,7 +160,7 @@
68 {
69 thiz.frequency_ = com::ubuntu::location::connectivity::WirelessNetwork::Frequency
70 {
71- value.as<org::freedesktop::NetworkManager::AccessPoint::Frequency::ValueType>()
72+ static_cast<int>(value.as<org::freedesktop::NetworkManager::AccessPoint::Frequency::ValueType>())
73 };
74 }
75 },
76
77=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp'
78--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2014-06-10 09:08:10 +0000
79+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.cpp 2014-07-29 11:33:44 +0000
80@@ -196,7 +196,7 @@
81 });
82
83 // And update our cache of modems and registered cells.
84- auto cell = std::make_shared<CachedRadioCell>(modem);
85+ auto cell = std::make_shared<detail::CachedRadioCell>(modem);
86 {
87 std::lock_guard<std::mutex> lg(cached.guard);
88 cached.modems.insert(std::make_pair(modem.object->path(), modem));
89@@ -209,7 +209,7 @@
90
91 void impl::OfonoNmConnectivityManager::Private::on_modem_removed(const core::dbus::types::ObjectPath& path)
92 {
93- CachedRadioCell::Ptr cell;
94+ detail::CachedRadioCell::Ptr cell;
95 {
96 std::lock_guard<std::mutex> lg(cached.guard);
97
98@@ -269,7 +269,7 @@
99 {
100 // A new network registration is coming in and we have to create
101 // a corresponding cell instance.
102- auto cell = std::make_shared<CachedRadioCell>(itm->second);
103+ auto cell = std::make_shared<detail::CachedRadioCell>(itm->second);
104 cached.cells.insert(std::make_pair(path,cell));
105 // Cache is up to date now and we announce the new cell to
106 // API customers, with the lock on the cache not being held.
107@@ -370,7 +370,7 @@
108 network_manager->service->add_object_for_path(ap_path)
109 };
110
111- auto wifi = std::make_shared<CachedWirelessNetwork>(itd->second, ap);
112+ auto wifi = std::make_shared<detail::CachedWirelessNetwork>(itd->second, ap);
113 cached.wifis[ap_path] = wifi;
114
115 // Let API consumers know that an AP appeared. The lock on the cache is
116
117=== modified file 'src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h'
118--- src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h 2014-06-10 09:08:10 +0000
119+++ src/location_service/com/ubuntu/location/connectivity/ofono_nm_connectivity_manager.h 2014-07-29 11:33:44 +0000
120@@ -91,9 +91,9 @@
121 struct
122 {
123 mutable std::mutex guard;
124- std::map<core::dbus::types::ObjectPath, CachedRadioCell::Ptr> cells;
125+ std::map<core::dbus::types::ObjectPath, detail::CachedRadioCell::Ptr> cells;
126 std::map<core::dbus::types::ObjectPath, org::Ofono::Manager::Modem> modems;
127- std::map<core::dbus::types::ObjectPath, CachedWirelessNetwork::Ptr> wifis;
128+ std::map<core::dbus::types::ObjectPath, detail::CachedWirelessNetwork::Ptr> wifis;
129 std::map<core::dbus::types::ObjectPath, org::freedesktop::NetworkManager::Device> wireless_devices;
130 } cached;
131
132
133=== modified file 'src/location_service/com/ubuntu/location/service/daemon.cpp'
134--- src/location_service/com/ubuntu/location/service/daemon.cpp 2014-06-23 04:57:59 +0000
135+++ src/location_service/com/ubuntu/location/service/daemon.cpp 2014-07-29 11:33:44 +0000
136@@ -86,7 +86,7 @@
137
138 location::service::Daemon::Configuration location::service::Daemon::Configuration::from_command_line_args(
139 int argc,
140- char** argv,
141+ const char** argv,
142 location::service::Daemon::DBusConnectionFactory factory)
143 {
144 location::service::Daemon::Configuration result;
145@@ -256,7 +256,7 @@
146
147 location::service::Daemon::Cli::Configuration location::service::Daemon::Cli::Configuration::from_command_line_args(
148 int argc,
149- char** argv,
150+ const char** argv,
151 location::service::Daemon::DBusConnectionFactory factory)
152 {
153 location::service::Daemon::Cli::Configuration result;
154
155=== modified file 'src/location_service/com/ubuntu/location/service/daemon.h'
156--- src/location_service/com/ubuntu/location/service/daemon.h 2014-06-23 04:57:59 +0000
157+++ src/location_service/com/ubuntu/location/service/daemon.h 2014-07-29 11:33:44 +0000
158@@ -102,7 +102,7 @@
159 */
160 static Configuration from_command_line_args(
161 int argc,
162- char** argv,
163+ const char** argv,
164 DBusConnectionFactory factory = default_dbus_connection_factory());
165
166 /** @brief The bus to connect to. */
167@@ -148,7 +148,7 @@
168 */
169 static Configuration from_command_line_args(
170 int argc,
171- char** argv,
172+ const char** argv,
173 DBusConnectionFactory factory = default_dbus_connection_factory());
174
175 /** @brief The bus to expose the service upon. */
176
177=== modified file 'src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp'
178--- src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp 2014-06-27 07:20:19 +0000
179+++ src/location_service/com/ubuntu/location/service/daemon_cli_main.cpp 2014-07-29 11:33:44 +0000
180@@ -25,7 +25,7 @@
181
182 namespace location = com::ubuntu::location;
183
184-int main(int argc, char** argv)
185+int main(int argc, const char** argv)
186 {
187 // Setup logging for the CLI.
188 FLAGS_logtostderr = true;
189
190=== modified file 'src/location_service/com/ubuntu/location/service/daemon_main.cpp'
191--- src/location_service/com/ubuntu/location/service/daemon_main.cpp 2014-07-29 11:33:44 +0000
192+++ src/location_service/com/ubuntu/location/service/daemon_main.cpp 2014-07-29 11:33:44 +0000
193@@ -30,7 +30,7 @@
194 constexpr const char* log_dir{"/var/log/ubuntu-location-service"};
195 }
196
197-int main(int argc, char** argv)
198+int main(int argc, const char** argv)
199 {
200 // Setup logging for the daemon.
201 boost::system::error_code ec;
202
203=== modified file 'src/location_service/com/ubuntu/location/service/skeleton.cpp'
204--- src/location_service/com/ubuntu/location/service/skeleton.cpp 2014-06-24 08:35:08 +0000
205+++ src/location_service/com/ubuntu/location/service/skeleton.cpp 2014-07-29 11:33:44 +0000
206@@ -46,8 +46,8 @@
207 {
208 return culs::Credentials
209 {
210- daemon.get_connection_unix_process_id(msg->sender()),
211- daemon.get_connection_unix_user(msg->sender())
212+ static_cast<pid_t>(daemon.get_connection_unix_process_id(msg->sender())),
213+ static_cast<uid_t>(daemon.get_connection_unix_user(msg->sender()))
214 };
215 }
216
217
218=== modified file 'tests/daemon_and_cli_tests.cpp'
219--- tests/daemon_and_cli_tests.cpp 2014-06-23 04:57:59 +0000
220+++ tests/daemon_and_cli_tests.cpp 2014-07-29 11:33:44 +0000
221@@ -191,7 +191,7 @@
222 }
223 TEST(DaemonCli, CommandLineArgsParsingWorksForCorrectArguments)
224 {
225- char* args[] =
226+ const char* args[] =
227 {
228 "--bus", "session",
229 "--get",
230@@ -206,7 +206,7 @@
231
232 TEST(DaemonCli, CommandLineArgsParsingThrowsForInvalidArguments)
233 {
234- char* args[] =
235+ const char* args[] =
236 {
237 "--bus", "session",
238 "--get", "--set", // Both get and set specificed, expected to throw
239@@ -218,7 +218,7 @@
240
241 TEST(Daemon, CommandLineParsingThrowsForEmptyProviders)
242 {
243- char* args[] =
244+ const char* args[] =
245 {
246 "--bus", "session"
247 };
248@@ -228,7 +228,7 @@
249
250 TEST(Daemon, CommandLineParsingDoesNotThrowForEmptyProvidersInTesting)
251 {
252- char* args[] =
253+ const char* args[] =
254 {
255 "--bus", "session",
256 "--testing"
257@@ -239,7 +239,7 @@
258
259 TEST(Daemon, CommandLineParsingWorksForProvidersAndProviderOptions)
260 {
261- char* args[] =
262+ const char* args[] =
263 {
264 "--bus", "session",
265 "--provider", "does::not::exist::Provider",

Subscribers

People subscribed via source and target branches