[openib-general] [PATCH] diags: fix compilation warning with gcc-4.1.1

Sasha Khapyorsky sashak at voltaire.com
Mon Oct 23 14:53:03 PDT 2006


This fixes 'differ in signedness pointer' compilation warnings with
gcc-4.1.1 .

Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
 diags/src/ibportstate.c |    8 ++++----
 diags/src/smpquery.c    |    4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/diags/src/ibportstate.c b/diags/src/ibportstate.c
index bf180f1..1af87c7 100644
--- a/diags/src/ibportstate.c
+++ b/diags/src/ibportstate.c
@@ -84,7 +84,7 @@ iberror(const char *fn, char *msg, ...)
 /*******************************************/
 
 static int
-get_node_info(ib_portid_t *dest, char *data)
+get_node_info(ib_portid_t *dest, uint8_t *data)
 {
 	int node_type;
 
@@ -99,7 +99,7 @@ get_node_info(ib_portid_t *dest, char *d
 }
 
 static int
-get_port_info(ib_portid_t *dest, char *data, int portnum, int port_op)
+get_port_info(ib_portid_t *dest, uint8_t *data, int portnum, int port_op)
 {
 	char buf[2048];
 	char val[64];
@@ -120,7 +120,7 @@ get_port_info(ib_portid_t *dest, char *d
 }
 
 static int 
-set_port_info(ib_portid_t *dest, char *data, int portnum, int port_op)
+set_port_info(ib_portid_t *dest, uint8_t *data, int portnum, int port_op)
 {
 	char buf[2048];
 	char val[64];
@@ -230,7 +230,7 @@ main(int argc, char **argv)
 	int state, physstate, lwe, lws, lwa, lse, lss, lsa;
 	int peerlocalportnum, peerlwe, peerlws, peerlwa, peerlse, peerlss, peerlsa;
 	int width, peerwidth, peerspeed;
-	char data[IB_SMP_DATA_SIZE];
+	uint8_t data[IB_SMP_DATA_SIZE];
 	ib_portid_t peerportid = {0};
 	int portnum = 0;
 	ib_portid_t selfportid = {0};
diff --git a/diags/src/smpquery.c b/diags/src/smpquery.c
index 88ad86a..68f9258 100644
--- a/diags/src/smpquery.c
+++ b/diags/src/smpquery.c
@@ -238,7 +238,7 @@ static char *sl2vl_dump_table_entry(ib_p
 static char *
 sl2vl_table(ib_portid_t *dest, char **argv, int argc)
 {
-	char data[IB_SMP_DATA_SIZE];
+	uint8_t data[IB_SMP_DATA_SIZE];
 	int type, num_ports, portnum = 0;
 	int i;
 	char *ret;
@@ -300,7 +300,7 @@ static char *vlarb_dump_table(ib_portid_
 static char *
 vlarb_table(ib_portid_t *dest, char **argv, int argc)
 {
-	char data[IB_SMP_DATA_SIZE];
+	uint8_t data[IB_SMP_DATA_SIZE];
 	int portnum = 0;
 	int type, enhsp0, lowcap, highcap;
 	char *ret = 0;
-- 
1.4.3.g7768





More information about the general mailing list