[Stgt-devel] [PATCH] quiet gcc warnings
Pete Wyckoff
pw
Sun Mar 18 16:23:24 CET 2007
Quiet some useless gcc warnings about char signedness.
Signed-off-by: Pete Wyckoff <pw at osc.edu>
---
usr/iscsi/iscsid.c | 2 +-
usr/spc.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 30892ce..e7e2d91 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1044,7 +1044,7 @@ static int iscsi_target_cmd_queue(struct iscsi_task *task)
if (ahs_extcdb->ahstype == ISCSI_AHSTYPE_CDB) {
int extcdb_len = ntohs(ahs_extcdb->ahslength) - 1;
- char *p = (void *)task->extdata;
+ uint8_t *p = (void *)task->extdata;
if (4 + extcdb_len > ahslen) {
eprintf("AHS len %d too short for extcdb %d\n",
diff --git a/usr/spc.c b/usr/spc.c
index 7221915..80e6ce1 100644
--- a/usr/spc.c
+++ b/usr/spc.c
@@ -63,9 +63,9 @@ int spc_inquiry(int host_no, struct scsi_cmd *cmd)
data[4] = 59;
data[7] = 0x02;
memset(data + 8, 0x20, 28);
- strncpy(data + 8, VENDOR_ID, 8);
- strncpy(data + 16, product_id, 16);
- strncpy(data + 32, PRODUCT_REV, 4);
+ strncpy((char *) data + 8, VENDOR_ID, 8);
+ strncpy((char *) data + 16, product_id, 16);
+ strncpy((char *) data + 32, PRODUCT_REV, 4);
data[58] = 0x03;
data[59] = 0x20;
data[60] = 0x09;
--
1.5.0.3
More information about the stgt
mailing list