Fix some complier warnings.
authorMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 15:47:31 +0000 (15:47 +0000)
committerMilan Broz <gmazyland@gmail.com>
Sun, 9 Oct 2011 15:47:31 +0000 (15:47 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@628 36d66b0a-2a48-0410-832c-cd162a569da5

lib/utils_devpath.c
lib/utils_wipe.c

index a81a285..91c6500 100644 (file)
@@ -32,6 +32,7 @@
 
 char *crypt_lookup_dev(const char *dev_id);
 int crypt_sysfs_check_crypt_segment(const char *device, uint64_t offset, uint64_t size);
+int crypt_sysfs_get_rotational(int major, int minor, int *rotational);
 
 static char *__lookup_dev(char *path, dev_t dev, int dir_level, const int max_level)
 {
index 3276130..523e9e8 100644 (file)
@@ -78,7 +78,7 @@ static ssize_t _crypt_wipe_disk(int fd, char *buffer, uint64_t offset, uint64_t
                else if(i >= 38 && i < 39) memset(buffer, 0xFF, size);
 
                written = write_lseek_blockwise(fd, buffer, size, offset);
-               if (written < 0 || written != size)
+               if (written < 0 || written != (ssize_t)size)
                        return written;
        }
 
@@ -165,7 +165,7 @@ int crypt_wipe(const char *device,
        close(devfd);
        free(buffer);
 
-       if (written != size || written < 0)
+       if (written != (ssize_t)size || written < 0)
                return -EIO;
 
        return 0;