From fd6d06e3f3ef7aa24e1df5f8d8bee1776b9eb698 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 31 Mar 2010 09:18:28 +0000 Subject: [PATCH] Fixed several compiler warnings. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1572 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 6 +++--- scst/src/scst_lib.c | 2 +- scst/src/scst_sysfs.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 81e04fe05..9fc9228bc 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -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 */ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 303495ac7..b0cf99628 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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; } diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index b040af7e4..be10715f9 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -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;