Merge lp:~xnox/upstart/compiler-warnings into lp:upstart

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 1520
Proposed branch: lp:~xnox/upstart/compiler-warnings
Merge into: lp:upstart
Diff against target: 284 lines (+51/-41)
5 files modified
extra/upstart-local-bridge.c (+1/-1)
po/upstart.pot (+41/-37)
util/reboot.c (+3/-1)
util/shutdown.c (+3/-1)
util/telinit.c (+3/-1)
To merge this branch: bzr merge lp:~xnox/upstart/compiler-warnings
Reviewer Review Type Date Requested Status
James Hunt Approve
Review via email: mp+181266@code.launchpad.net
To post a comment you must log in.
Revision history for this message
James Hunt (jamesodhunt) wrote :

LGTM.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'extra/upstart-local-bridge.c'
2--- extra/upstart-local-bridge.c 2013-07-25 19:55:45 +0000
3+++ extra/upstart-local-bridge.c 2013-08-21 11:29:15 +0000
4@@ -516,7 +516,7 @@
5 socklen_t client_len;
6 nih_local char *buffer = NULL;
7 ClientConnection *client;
8- size_t len;
9+ socklen_t len;
10
11 nih_assert (sock);
12 nih_assert (watch);
13
14=== modified file 'po/upstart.pot'
15--- po/upstart.pot 2013-07-17 14:18:42 +0000
16+++ po/upstart.pot 2013-08-21 11:29:15 +0000
17@@ -8,7 +8,7 @@
18 msgstr ""
19 "Project-Id-Version: upstart 1.10\n"
20 "Report-Msgid-Bugs-To: new@bugs.launchpad.net\n"
21-"POT-Creation-Date: 2013-07-17 15:09+0100\n"
22+"POT-Creation-Date: 2013-08-21 12:26+0100\n"
23 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
24 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
25 "Language-Team: LANGUAGE <LL@li.org>\n"
26@@ -59,7 +59,7 @@
27 msgid "You do not have permission to reload configuration"
28 msgstr ""
29
30-#: init/control.c:423 init/main.c:915
31+#: init/control.c:423 init/main.c:919
32 msgid "Reloading configuration"
33 msgstr ""
34
35@@ -702,7 +702,7 @@
36 "actually run /sbin/telinit."
37 msgstr ""
38
39-#: init/main.c:228 util/reboot.c:170 util/shutdown.c:371 util/telinit.c:248
40+#: init/main.c:228 util/reboot.c:172 util/shutdown.c:373 util/telinit.c:250
41 msgid "Need to be root"
42 msgstr ""
43
44@@ -730,7 +730,7 @@
45 msgid "Unable to initialize console as /dev/null"
46 msgstr ""
47
48-#: init/main.c:351 init/main.c:797
49+#: init/main.c:351 init/main.c:801
50 msgid "Unable to set root directory"
51 msgstr ""
52
53@@ -742,62 +742,62 @@
54 msgid "Unable to mount /sys filesystem"
55 msgstr ""
56
57-#: init/main.c:486 init/main.c:492
58+#: init/main.c:485 init/main.c:491
59 msgid "Unable to set default oom score"
60 msgstr ""
61
62-#: init/main.c:501
63+#: init/main.c:500
64 msgid "Stateful re-exec supported but stateless re-exec requested"
65 msgstr ""
66
67-#: init/main.c:515
68+#: init/main.c:514
69 msgid "Failed to read serialisation data"
70 msgstr ""
71
72-#: init/main.c:516 init/state.c:1965
73+#: init/main.c:515 init/state.c:1965
74 msgid "reverting to stateless re-exec"
75 msgstr ""
76
77-#: init/main.c:528
78+#: init/main.c:527
79 msgid "Both stateful and stateless re-execs failed"
80 msgstr ""
81
82-#: init/main.c:583
83+#: init/main.c:582
84 msgid "Unable to listen for private connections"
85 msgstr ""
86
87-#: init/main.c:617
88+#: init/main.c:616
89 msgid "Unable to setup standard file descriptors"
90 msgstr ""
91
92-#: init/main.c:673
93+#: init/main.c:672
94 msgid "Unable to register as subreaper"
95 msgstr ""
96
97-#: init/main.c:814
98+#: init/main.c:818
99 #, c-format
100 msgid "Caught %s, core dumped"
101 msgstr ""
102
103-#: init/main.c:818
104+#: init/main.c:822
105 #, c-format
106 msgid "Caught %s, unable to dump core"
107 msgstr ""
108
109-#: init/main.c:849
110+#: init/main.c:853
111 #, c-format
112 msgid "Re-executing %s"
113 msgstr ""
114
115-#: init/main.c:932
116+#: init/main.c:936
117 msgid "Reconnecting to system bus"
118 msgstr ""
119
120-#: init/main.c:938
121+#: init/main.c:942
122 msgid "Unable to connect to the system bus"
123 msgstr ""
124
125-#: init/main.c:1017
126+#: init/main.c:1021
127 msgid "invalid console type specified"
128 msgstr ""
129
130@@ -1266,28 +1266,32 @@
131 "than 0 or 6, it will actually execute /sbin/shutdown.\n"
132 msgstr ""
133
134-#: util/reboot.c:220
135+#: util/reboot.c:169 util/shutdown.c:370 util/telinit.c:247
136+msgid "Couldn't set uid."
137+msgstr ""
138+
139+#: util/reboot.c:222
140 msgid "Calling shutdown"
141 msgstr ""
142
143-#: util/reboot.c:223
144+#: util/reboot.c:225
145 #, c-format
146 msgid "Unable to execute shutdown: %s"
147 msgstr ""
148
149-#: util/reboot.c:244
150+#: util/reboot.c:246
151 msgid "Rebooting"
152 msgstr ""
153
154-#: util/reboot.c:248
155+#: util/reboot.c:250
156 msgid "Halting"
157 msgstr ""
158
159-#: util/reboot.c:252
160+#: util/reboot.c:254
161 msgid "Powering off"
162 msgstr ""
163
164-#: util/reboot.c:256
165+#: util/reboot.c:258
166 #, c-format
167 msgid "Rebooting with %s"
168 msgstr ""
169@@ -1380,57 +1384,57 @@
170 msgid "%s: illegal time value\n"
171 msgstr ""
172
173-#: util/shutdown.c:382
174+#: util/shutdown.c:384
175 msgid "Shutdown is not running"
176 msgstr ""
177
178-#: util/shutdown.c:391
179+#: util/shutdown.c:393
180 msgid "Another shutdown is already running"
181 msgstr ""
182
183-#: util/shutdown.c:395
184+#: util/shutdown.c:397
185 msgid "Cannot find pid of running shutdown"
186 msgstr ""
187
188-#: util/shutdown.c:409
189+#: util/shutdown.c:411
190 msgid "Unable to change directory"
191 msgstr ""
192
193-#: util/shutdown.c:423
194+#: util/shutdown.c:425
195 msgid "Unable to write pid file"
196 msgstr ""
197
198-#: util/shutdown.c:522
199+#: util/shutdown.c:524
200 msgid "Shutdown cancelled"
201 msgstr ""
202
203-#: util/shutdown.c:607
204+#: util/shutdown.c:609
205 msgid "The system is going down for power off NOW!"
206 msgstr ""
207
208-#: util/shutdown.c:620
209+#: util/shutdown.c:622
210 msgid "The system is going down for halt NOW!"
211 msgstr ""
212
213-#: util/shutdown.c:633
214+#: util/shutdown.c:635
215 msgid "The system is going down for maintenance NOW!"
216 msgstr ""
217
218-#: util/shutdown.c:646
219+#: util/shutdown.c:648
220 msgid "The system is going down for reboot NOW!"
221 msgstr ""
222
223-#: util/shutdown.c:693
224+#: util/shutdown.c:695
225 #, c-format
226 msgid "Unable to fork child-process to warn users: %s"
227 msgstr ""
228
229-#: util/shutdown.c:738
230+#: util/shutdown.c:740
231 #, c-format
232 msgid "Broadcast message from %s@%s"
233 msgstr ""
234
235-#: util/shutdown.c:740
236+#: util/shutdown.c:742
237 #, c-format
238 msgid "(%s) at %d:%02d ..."
239 msgstr ""
240
241=== modified file 'util/reboot.c'
242--- util/reboot.c 2013-02-20 16:26:48 +0000
243+++ util/reboot.c 2013-08-21 11:29:15 +0000
244@@ -165,7 +165,9 @@
245 exit (1);
246
247 /* Check we're root */
248- setuid (geteuid ());
249+ if (setuid (geteuid ()) < 0)
250+ nih_info (_("Couldn't set uid."));
251+
252 if (getuid ()) {
253 nih_fatal (_("Need to be root"));
254 exit (1);
255
256=== modified file 'util/shutdown.c'
257--- util/shutdown.c 2012-08-31 18:20:27 +0000
258+++ util/shutdown.c 2013-08-21 11:29:15 +0000
259@@ -366,7 +366,9 @@
260
261
262 /* Check we're root, or setuid root */
263- setuid (geteuid ());
264+ if (setuid (geteuid ()) < 0)
265+ nih_info (_("Couldn't set uid."));
266+
267 if (getuid ()) {
268 nih_fatal (_("Need to be root"));
269 exit (1);
270
271=== modified file 'util/telinit.c'
272--- util/telinit.c 2012-12-07 16:56:08 +0000
273+++ util/telinit.c 2013-08-21 11:29:15 +0000
274@@ -243,7 +243,9 @@
275 }
276
277 /* Check we're root */
278- setuid (geteuid ());
279+ if (setuid (geteuid ()) < 0)
280+ nih_info (_("Couldn't set uid."));
281+
282 if (getuid ()) {
283 nih_fatal (_("Need to be root"));
284 exit (1);

Subscribers

People subscribed via source and target branches