[ofa-general] [PATCH TRIVIAL] diags: clean gcc-4.1 warnigns
Sasha Khapyorsky
sashak at voltaire.com
Mon Mar 5 11:59:01 PST 2007
Clean pointer target signedness warnings generated by gcc-4.1
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
diags/include/ibdiag_common.h | 2 +-
diags/src/ibdiag_common.c | 2 +-
diags/src/saquery.c | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/diags/include/ibdiag_common.h b/diags/include/ibdiag_common.h
index 030bdaa..2d463c5 100644
--- a/diags/include/ibdiag_common.h
+++ b/diags/include/ibdiag_common.h
@@ -63,6 +63,6 @@ char *lookup_switch_name(FILE *switch_map_fp, uint64_t target_guid,
void iberror(const char *fn, char *msg, ...);
/* NOTE: this modifies the parameter "nodedesc". */
-char *clean_nodedesc(uint8_t *nodedesc);
+char *clean_nodedesc(char *nodedesc);
#endif /* _IBDIAG_COMMON_H_ */
diff --git a/diags/src/ibdiag_common.c b/diags/src/ibdiag_common.c
index 6ae02c5..a81bb95 100644
--- a/diags/src/ibdiag_common.c
+++ b/diags/src/ibdiag_common.c
@@ -135,7 +135,7 @@ iberror(const char *fn, char *msg, ...)
}
char *
-clean_nodedesc(uint8_t *nodedesc)
+clean_nodedesc(char *nodedesc)
{
int i = 0;
diff --git a/diags/src/saquery.c b/diags/src/saquery.c
index fce11d3..f581e0c 100644
--- a/diags/src/saquery.c
+++ b/diags/src/saquery.c
@@ -101,7 +101,7 @@ print_node_desc(ib_node_record_t *node_record)
{
printf("%6d \"%s\"\n",
cl_ntoh16(node_record->lid),
- clean_nodedesc(p_nd->description));
+ clean_nodedesc((char *)p_nd->description));
}
}
@@ -156,7 +156,7 @@ print_node_record(ib_node_record_t *node_record)
cl_ntoh32( p_ni->revision ),
ib_node_info_get_local_port_num( p_ni ),
cl_ntoh32( ib_node_info_get_vendor_id( p_ni )),
- clean_nodedesc(node_record->node_desc.description)
+ clean_nodedesc((char *)node_record->node_desc.description)
);
}
@@ -331,7 +331,7 @@ print_multicast_member_record(ib_member_rec_t *p_mcmr)
"0x%016" PRIx64 " (%s)\n",
gid_prefix,
gid_interface_id,
- clean_nodedesc(node_record->node_desc.description)
+ clean_nodedesc((char *)node_record->node_desc.description)
);
}
} else {
@@ -352,7 +352,7 @@ print_multicast_member_record(ib_member_rec_t *p_mcmr)
gid_interface_id,
p_mcmr->scope_state,
p_mcmr->proxy_join,
- clean_nodedesc(node_record->node_desc.description)
+ clean_nodedesc((char *)node_record->node_desc.description)
);
}
}
--
1.5.0.3.287.gf6d7
More information about the general
mailing list