OSDN Git Service

Fix compiling warnings
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 10 Feb 2013 14:57:14 +0000 (22:57 +0800)
committerChih-Wei Huang <cwhuang@android-x86.org>
Sun, 10 Feb 2013 15:34:36 +0000 (23:34 +0800)
The patch removes the following warnings:

system/vold/vdc.c: In function 'do_cmd':
system/vold/vdc.c:71:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
[...]

In file included from system/vold/Fat.cpp:34:0:
bionic/libc/kernel/common/linux/fs.h:109:0: warning: "MS_RMT_MASK" redefined [enabled by default]
In file included from system/vold/Fat.cpp:31:0:
bionic/libc/include/sys/mount.h:64:0: note: this is the location of the previous definition
[...]

Change-Id: I1e950dcec87f8bae0cec61a1611126b3abc0c90e

Devmapper.cpp
Ext4.cpp
Fat.cpp
Volume.cpp
vdc.c

index 7c11d12..6f43ac0 100644 (file)
@@ -124,7 +124,7 @@ void Devmapper::ioctlInit(struct dm_ioctl *io, size_t dataSize,
     io->version[2] = 0;
     io->flags = flags;
     if (name) {
-        int ret = strlcpy(io->name, name, sizeof(io->name));
+        size_t ret = strlcpy(io->name, name, sizeof(io->name));
        if (ret >= sizeof(io->name))
                abort();
     }
index 4ec0616..613d623 100644 (file)
--- a/Ext4.cpp
+++ b/Ext4.cpp
@@ -31,7 +31,6 @@
 #include <sys/mount.h>
 
 #include <linux/kdev_t.h>
-#include <linux/fs.h>
 
 #define LOG_TAG "Vold"
 
diff --git a/Fat.cpp b/Fat.cpp
index 82a3f7a..a7fcc28 100644 (file)
--- a/Fat.cpp
+++ b/Fat.cpp
@@ -31,7 +31,6 @@
 #include <sys/mount.h>
 
 #include <linux/kdev_t.h>
-#include <linux/fs.h>
 
 #define LOG_TAG "Vold"
 
index 0be2e81..4a00ccc 100644 (file)
@@ -28,7 +28,6 @@
 #include <sys/param.h>
 
 #include <linux/kdev_t.h>
-#include <linux/fs.h>
 
 #include <cutils/properties.h>
 
diff --git a/vdc.c b/vdc.c
index 7dad143..59f34d6 100644 (file)
--- a/vdc.c
+++ b/vdc.c
@@ -57,7 +57,7 @@ int main(int argc, char **argv) {
 static int do_cmd(int sock, int argc, char **argv) {
     char final_cmd[255] = "0 "; /* 0 is a (now required) sequence number */
     int i;
-    int ret;
+    size_t ret;
 
     for (i = 1; i < argc; i++) {
         char *cmp;