summaryrefslogtreecommitdiff
path: root/drive_id
diff options
context:
space:
mode:
authorDavid Zeuthen <david@fubar.dk>2005-07-26 04:40:43 +0000
committerDavid Zeuthen <david@fubar.dk>2005-07-26 04:40:43 +0000
commit83e3d385035e5d94fe8cef3291e4ba9e638fb0e1 (patch)
tree8f0dbaf254b6495f27f84d12eca9edb32e7708ec /drive_id
parent62b11cd04d08667a769f156f2807671a5f80b902 (diff)
This is a patch (against CVS) to fix several compiler warnings with gcc
3.x and 4.x. Please review. Patch from Danny Kukawka <danny.kukawka@web.de>.
Diffstat (limited to 'drive_id')
-rw-r--r--drive_id/ata.c6
-rw-r--r--drive_id/drive_id.c10
-rw-r--r--drive_id/scsi.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/drive_id/ata.c b/drive_id/ata.c
index ffdc1695..9b3d2a90 100644
--- a/drive_id/ata.c
+++ b/drive_id/ata.c
@@ -59,9 +59,9 @@ int drive_id_probe_ata(struct drive_id *id)
if (ioctl(id->fd, HDIO_GET_IDENTITY, &ata_id) != 0)
return -1;
- set_str(id->model, ata_id.model, 40);
- set_str(id->serial, ata_id.serial_no, 20);
- set_str(id->firmware, ata_id.fw_rev, 8);
+ set_str((char *) id->model, ata_id.model, 40);
+ set_str((char *) id->serial, ata_id.serial_no, 20);
+ set_str((char *) id->firmware, ata_id.fw_rev, 8);
return 0;
}
diff --git a/drive_id/drive_id.c b/drive_id/drive_id.c
index 98cde964..92fc1047 100644
--- a/drive_id/drive_id.c
+++ b/drive_id/drive_id.c
@@ -113,18 +113,18 @@ struct drive_id *drive_id_open_dev_t(dev_t devt)
struct drive_id *id;
__u8 tmp_node[DRIVE_ID_PATH_MAX];
- snprintf(tmp_node, DRIVE_ID_PATH_MAX,
+ snprintf((char *) tmp_node, DRIVE_ID_PATH_MAX,
"/dev/.drive_id-%u-%u-%u", getpid(), major(devt), minor(devt));
tmp_node[DRIVE_ID_PATH_MAX] = '\0';
/* create tempory node to open the block device */
- unlink(tmp_node);
- if (mknod(tmp_node, (S_IFBLK | 0600), devt) != 0)
+ unlink((char *) tmp_node);
+ if (mknod((char *) tmp_node, (S_IFBLK | 0600), devt) != 0)
return NULL;
- id = drive_id_open_node(tmp_node);
+ id = drive_id_open_node((char *) tmp_node);
- unlink(tmp_node);
+ unlink((char *) tmp_node);
return id;
}
diff --git a/drive_id/scsi.c b/drive_id/scsi.c
index f9cb4244..8f81cdad 100644
--- a/drive_id/scsi.c
+++ b/drive_id/scsi.c
@@ -121,9 +121,9 @@ int drive_id_probe_scsi(struct drive_id *id)
return -1;
}
- set_str(id->vendor, &buf[8], 8);
- set_str(id->model, &buf[16], 16);
- set_str(id->revision, &buf[32], 12);
+ set_str((char *) id->vendor, &buf[8], 8);
+ set_str((char *) id->model, &buf[16], 16);
+ set_str((char *) id->revision, &buf[32], 12);
/* get serial number from page 0x80 */
memset(buf, 0, BUFFER_SIZE);
@@ -136,7 +136,7 @@ int drive_id_probe_scsi(struct drive_id *id)
dbg("page 0x80 serial number length %i", len);
if (len > DRIVE_ID_SERIAL_SIZE)
len = DRIVE_ID_SERIAL_SIZE;
- set_str(id->serial, &buf[4], len);
+ set_str((char *) id->serial, &buf[4], len);
return 0;
}