diff options
author | Sami Kerola | 2017-05-28 20:06:08 +0200 |
---|---|---|
committer | Karel Zak | 2017-06-14 12:21:01 +0200 |
commit | a9e3ec19898aaed0997e778490db711d11b7366f (patch) | |
tree | 4cb2dd44695dbf156512cf29ef2db452d0231ba2 /sys-utils/losetup.c | |
parent | misc: fix reassigned values before old ones has been used [cppcheck] (diff) | |
download | kernel-qcow2-util-linux-a9e3ec19898aaed0997e778490db711d11b7366f.tar.gz kernel-qcow2-util-linux-a9e3ec19898aaed0997e778490db711d11b7366f.tar.xz kernel-qcow2-util-linux-a9e3ec19898aaed0997e778490db711d11b7366f.zip |
losetup: add missing initializer [clang]
sys-utils/losetup.c:290:12: warning: variable 'rc' is used uninitialized
whenever 'if' condition is false [-Wsometimes-uninitialized]
sys-utils/losetup.c:293:7: note: uninitialized use occurs here
sys-utils/losetup.c:290:8: note: remove the 'if' if its condition is always true
sys-utils/losetup.c:228:9: note: initialize the variable 'rc' to silence
this warning
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/losetup.c')
-rw-r--r-- | sys-utils/losetup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/losetup.c b/sys-utils/losetup.c index e0676c9fd..8ed9a1e4b 100644 --- a/sys-utils/losetup.c +++ b/sys-utils/losetup.c @@ -225,7 +225,7 @@ static int set_scols_data(struct loopdev_cxt *lc, struct libscols_line *ln) const char *p = NULL; /* external data */ char *np = NULL; /* allocated here */ uint64_t x = 0; - int rc; + int rc = 0; switch(get_column_id(i)) { case COL_NAME: |