diff options
author | Ruediger Meier | 2016-03-12 23:55:48 +0100 |
---|---|---|
committer | Ruediger Meier | 2016-03-13 21:47:27 +0100 |
commit | 58c87bd045dfa5f924f25cd59577b36baf7817ff (patch) | |
tree | 1f31a83c298514bdc8d0e3c05f58cee83f9c78cd /libmount/src/tab.c | |
parent | misc: fix printf i386 compiler warnings (diff) | |
download | kernel-qcow2-util-linux-58c87bd045dfa5f924f25cd59577b36baf7817ff.tar.gz kernel-qcow2-util-linux-58c87bd045dfa5f924f25cd59577b36baf7817ff.tar.xz kernel-qcow2-util-linux-58c87bd045dfa5f924f25cd59577b36baf7817ff.zip |
misc: fix icc/clang compiler warnings
clang warning:
libmount/src/tab.c:1833:6: warning: variable 'rc' is used uninitialized whenever
'if' condition is true [-Wsometimes-uninitialized]
if (!mpc)
^~~~
icc printf warnings:
libmount/src/monitor.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
DBG(MONITOR, ul_debugobj(mn, status == 1 ? " success" : " nothing"));
^
login-utils/vipw.c(348): warning #2279: printf/scanf format not a string literal and no format arguments
: _("You are using shadow passwords on this system.\n"));
^
icc enum warnings:
disk-utils/fdisk-menu.c(150): warning #188: enumerated type mixed with another type
.exclude = FDISK_DISKLABEL_GPT | FDISK_DISKLABEL_BSD,
^
libsmartcols/src/table_print.c(750): warning #188: enumerated type mixed with another type
&width, align,
^
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
Diffstat (limited to 'libmount/src/tab.c')
-rw-r--r-- | libmount/src/tab.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libmount/src/tab.c b/libmount/src/tab.c index 057004436..a7a1b6b1e 100644 --- a/libmount/src/tab.c +++ b/libmount/src/tab.c @@ -1808,7 +1808,7 @@ static int test_is_mounted(struct libmnt_test *ts, int argc, char *argv[]) struct libmnt_fs *fs; struct libmnt_iter *itr = NULL; struct libmnt_cache *mpc = NULL; - int rc, writable = 0; + int writable = 0; const char *path = NULL; if (mnt_has_regular_mtab(&path, &writable) == 1 && writable == 0) @@ -1846,12 +1846,11 @@ static int test_is_mounted(struct libmnt_test *ts, int argc, char *argv[]) mnt_fs_get_target(fs)); } - rc = 0; done: mnt_unref_table(tb); mnt_unref_table(fstab); mnt_free_iter(itr); - return rc; + return 0; } /* returns 0 if @a and @b targets are the same */ |