diff mbox series

[24/25] libiscsi: fix compile warning on data types

Message ID 20220209222610.438470-25-mcgrof@kernel.org (mailing list archive)
State New, archived
Headers show
Series dbench: fix compile warnings and update a bit | expand

Commit Message

Luis Chamberlain Feb. 9, 2022, 10:26 p.m. UTC
This fixes this compilation warning:

libiscsi.c: In function ‘iscsi_write10’:
libiscsi.c:119:40: warning: pointer targets in passing argument 4 of
‘iscsi_write10_sync’ differ in signedness [-Wpointer-sign]
  119 |                                        data, xferlen*512, 512,
      |                                        ^~~~
      |                                        |
      |                                        char *
In file included from libiscsi.c:26:
/usr/include/iscsi/iscsi.h:1200:35: note: expected ‘unsigned char *’ but
argument is of type ‘char *’
 1200 |                    unsigned char *data, uint32_t datalen, int
      blocksize,
      |                    ~~~~~~~~~~~~~~~^~~~
   CC

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
 libiscsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libiscsi.c b/libiscsi.c
index 3bc5771..128a7d5 100644
--- a/libiscsi.c
+++ b/libiscsi.c
@@ -99,7 +99,7 @@  static void iscsi_write10(struct dbench_op *op)
 	uint32_t xferlen = op->params[1];	
 	int fua = op->params[2];
 	unsigned int data_size=1024*1024;
-	char data[data_size];
+	unsigned char data[data_size];
 
 	sd = op->child->private;