chiark / gitweb /
sysusers: Remove some gcc warnings about uninitialized variables
authorPhilippe De Swert <philippedeswert@gmail.com>
Thu, 18 Sep 2014 15:56:57 +0000 (18:56 +0300)
committerTom Gundersen <teg@jklm.no>
Thu, 18 Sep 2014 16:32:18 +0000 (18:32 +0200)
Gcc is spewing some warnings about uninitialized variables.
Let's get rid of the noise.

src/sysusers/sysusers.c

index ba20d949dc5b2aad24df5655980c1309cf07eb1f..4203b3e0179c5c13c23eb8e729e527ac4459ea70 100644 (file)
@@ -796,8 +796,8 @@ static int root_stat(const char *p, struct stat *st) {
 static int read_id_from_file(Item *i, uid_t *_uid, gid_t *_gid) {
         struct stat st;
         bool found_uid = false, found_gid = false;
-        uid_t uid;
-        gid_t gid;
+        uid_t uid = 0;
+        gid_t gid = 0;
 
         assert(i);