summaryrefslogtreecommitdiffstats
path: root/libmount/src/utils.c
diff options
context:
space:
mode:
authorKarel Zak2011-08-02 11:21:16 +0200
committerKarel Zak2011-08-02 11:21:16 +0200
commit7fc6d2b8f8f55f38f069414706bac59c20dd4d24 (patch)
treeed281faa7deef7ef6d5d06dcb545527009918725 /libmount/src/utils.c
parentchrt: [selinux] fix compiler warnings [-Wsign-compare] (diff)
downloadkernel-qcow2-util-linux-7fc6d2b8f8f55f38f069414706bac59c20dd4d24.tar.gz
kernel-qcow2-util-linux-7fc6d2b8f8f55f38f069414706bac59c20dd4d24.tar.xz
kernel-qcow2-util-linux-7fc6d2b8f8f55f38f069414706bac59c20dd4d24.zip
libmount: fix compiler warnings [-Wunused-parameter -Wsign-compare]
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libmount/src/utils.c')
-rw-r--r--libmount/src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libmount/src/utils.c b/libmount/src/utils.c
index 67389709b..f4d51e787 100644
--- a/libmount/src/utils.c
+++ b/libmount/src/utils.c
@@ -263,7 +263,8 @@ static int check_option(const char *haystack, size_t len,
for (p = haystack; p && p < haystack + len; p++) {
char *sep = strchr(p, ',');
- size_t plen = sep ? sep - p : len - (p - haystack);
+ size_t plen = sep ? (size_t) (sep - p) :
+ len - (p - haystack);
if (plen == needle_len) {
if (!strncmp(p, needle, plen))
@@ -309,7 +310,8 @@ int mnt_match_options(const char *optstr, const char *pattern)
for (p = pattern; p < pattern + len; p++) {
char *sep = strchr(p, ',');
- size_t plen = sep ? sep - p : len - (p - pattern);
+ size_t plen = sep ? (size_t) (sep - p) :
+ len - (p - pattern);
if (!plen)
continue; /* if two ',' appear in a row */