chiark / gitweb /
Prep v228: Silence uninitialized usage warnings.
authorSven Eden <yamakuzure@gmx.net>
Thu, 13 Apr 2017 11:47:48 +0000 (13:47 +0200)
committerSven Eden <yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:59:13 +0000 (12:59 +0200)
src/login/logind-core.c
src/login/logind-dbus.c
src/login/logind-user.c

index 0420b54..a128246 100644 (file)
@@ -117,8 +117,8 @@ int manager_add_user(Manager *m, uid_t uid, gid_t gid, const char *name, User **
 }
 
 int manager_add_user_by_name(Manager *m, const char *name, User **_user) {
-        uid_t uid;
-        gid_t gid;
+        uid_t uid = 1000;
+        gid_t gid = 1000;
         int r;
 
         assert(m);
index b549552..209e62b 100644 (file)
@@ -2036,7 +2036,7 @@ static int method_schedule_shutdown(sd_bus_message *message, void *userdata, sd_
 
         r = sd_bus_query_sender_creds(message, SD_BUS_CREDS_AUGMENT|SD_BUS_CREDS_TTY|SD_BUS_CREDS_UID, &creds);
         if (r >= 0) {
-                const char *tty;
+                const char *tty = NULL;
 
                 (void) sd_bus_creds_get_uid(creds, &m->scheduled_shutdown_uid);
                 (void) sd_bus_creds_get_tty(creds, &tty);
index 110fb7e..c1bf1d4 100644 (file)
@@ -922,7 +922,7 @@ int config_parse_tmpfs_size(
 
                 *sz = PAGE_ALIGN((size_t) ((physical_memory() * (uint64_t) ul) / (uint64_t) 100));
         } else {
-                uint64_t k;
+                uint64_t k = 0;
 
                 r = parse_size(rvalue, 1024, &k);
                 if (r < 0 || (uint64_t) (size_t) k != k) {