fix some compiler warnings

This commit is contained in:
Ronnie Sahlberg
2012-03-10 12:08:05 +11:00
parent ed1d957ec9
commit a5d81fc16a
6 changed files with 7 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ int T0102_read10_0blocks(const char *initiator, const char *url)
struct iscsi_context *iscsi;
struct scsi_task *task;
struct scsi_readcapacity10 *rc10;
int ret, i, lun;
int ret, lun;
uint32_t block_size, num_blocks;
iscsi = iscsi_context_login(initiator, url, &lun);

View File

@@ -229,7 +229,7 @@ test5:
task->expxferlen = sizeof(buf);
data.size = sizeof(buf);
data.data = &buf[0];
data.data = (unsigned char *)&buf[0];
if (iscsi_scsi_command_sync(iscsi, lun, task, &data) == NULL) {
printf("[FAILED]\n");

View File

@@ -25,7 +25,7 @@ int T0110_readcapacity10_simple(const char *initiator, const char *url)
struct iscsi_context *iscsi;
struct scsi_task *task;
struct scsi_readcapacity10 *rc10;
int ret, i, lun;
int ret, lun;
ret = 0;

View File

@@ -229,7 +229,7 @@ test5:
task->expxferlen = sizeof(buf);
data.size = sizeof(buf);
data.data = &buf[0];
data.data = (unsigned char *)&buf[0];
if (iscsi_scsi_command_sync(iscsi, lun, task, &data) == NULL) {
printf("[FAILED]\n");

View File

@@ -66,7 +66,7 @@ int T0130_verify10_simple(const char *initiator, const char *url)
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Read+verify first 1-256 blocks ... ");
for (i = 1; i <= 256; i++) {
char *buf;
unsigned char *buf;
task = iscsi_read10_sync(iscsi, lun, 0, i * block_size, block_size);
if (task == NULL) {

View File

@@ -16,6 +16,7 @@
*/
#include <stdio.h>
#include <stdlib.h>
#include "iscsi.h"
#include "scsi-lowlevel.h"
#include "iscsi-test.h"
@@ -66,7 +67,7 @@ int T0131_verify10_mismatch(const char *initiator, const char *url)
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Read+verify first 1-256 blocks ... ");
for (i = 1; i <= 256; i++) {
char *buf;
unsigned char *buf;
task = iscsi_read10_sync(iscsi, lun, 0, i * block_size, block_size);
if (task == NULL) {