Fixed several compiler warnings.
authorbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 31 Mar 2010 09:18:28 +0000 (09:18 +0000)
committerbvassche <bvassche@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Wed, 31 Mar 2010 09:18:28 +0000 (09:18 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@1572 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/src/dev_handlers/scst_vdisk.c
scst/src/scst_lib.c
scst/src/scst_sysfs.c

index 81e04fe..9fc9228 100644 (file)
@@ -292,7 +292,7 @@ static int vcdrom_write_proc(char *buffer, char **start, off_t offset,
 static ssize_t vdisk_add_fileio_device(const char *device_name, char *params);
 static ssize_t vdisk_add_blockio_device(const char *device_name, char *params);
 static ssize_t vdisk_add_nullio_device(const char *device_name, char *params);
-static int vdisk_del_device(const char *device_name);
+static ssize_t vdisk_del_device(const char *device_name);
 static ssize_t vcdrom_add_device(const char *device_name, char *params);
 static int vcdrom_del_device(const char *device_name);
 #endif
@@ -3387,7 +3387,7 @@ static void vdev_del_device(struct scst_vdisk_dev *virt_dev)
 
 #ifndef CONFIG_SCST_PROC
 
-static int vdisk_del_device(const char *device_name)
+static ssize_t vdisk_del_device(const char *device_name)
 {
        int res = 0;
        struct scst_vdisk_dev *virt_dev;
@@ -3417,7 +3417,7 @@ out:
 }
 
 /* scst_vdisk_mutex supposed to be held */
-static int __vcdrom_add_device(const char *device_name, char *params)
+static ssize_t __vcdrom_add_device(const char *device_name, char *params)
 {
        int res = 0;
        const char *allowed_params[] = { NULL }; /* no params */
index 303495a..b0cf996 100644 (file)
@@ -2538,7 +2538,7 @@ int scst_tgt_dev_setup_threads(struct scst_tgt_dev *tgt_dev)
                                                GFP_KERNEL);
                        if (io_context_kref == NULL) {
                                PRINT_ERROR("Unable to alloc io_context_kref "
-                                       "(size %d)", sizeof(*io_context_kref));
+                                       "(size %zd)", sizeof(*io_context_kref));
                                res = -ENOMEM;
                                goto out;
                        }
index b040af7..be10715 100644 (file)
@@ -981,7 +981,7 @@ static ssize_t scst_device_sysfs_threads_pool_type_store(struct kobject *kobj,
                goto out;
        }
 
-       TRACE_DBG("buf %s, count %d, newtpt %d", buf, count, newtpt);
+       TRACE_DBG("buf %s, count %zd, newtpt %d", buf, count, newtpt);
 
        res = scst_device_sysfs_threads_data_store(dev, dev->threads_num,
                newtpt);
@@ -3833,7 +3833,7 @@ int scst_sysfs_user_add_info(struct scst_sysfs_user_info **out_info)
 
        info = kzalloc(sizeof(*info), GFP_KERNEL);
        if (info == NULL) {
-               PRINT_ERROR("Unable to allocate sysfs user info (size %d)",
+               PRINT_ERROR("Unable to allocate sysfs user info (size %zd)",
                        sizeof(*info));
                res = -ENOMEM;
                goto out;