[PATCH 2/6] Cast poniter type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Honggang Li <honli@xxxxxxxxxx>

make[2]: Entering directory '/home/honli/upstream-repos/opensm/libvendor'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../include/opensm  -I./../include -I./../../libibumad/include -I/usr/local/include  -Werror -Wall -Wwrite-strings -g -g -O2 -MT libosmvendor_la-osm_vendor_ibumad.lo -MD -MP -MF .deps/libosmvendor_la-osm_vendor_ibumad.Tpo -c -o libosmvendor_la-osm_vendor_ibumad.lo `test -f 'osm_vendor_ibumad.c' || echo './'`osm_vendor_ibumad.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../include -I../include/opensm -I./../include -I./../../libibumad/include -I/usr/local/include -Werror -Wall -Wwrite-strings -g -g -O2 -MT libosmvendor_la-osm_vendor_ibumad.lo -MD -MP -MF .deps/libosmvendor_la-osm_vendor_ibumad.Tpo -c osm_vendor_ibumad.c  -fPIC -DPIC -o .libs/libosmvendor_la-osm_vendor_ibumad.o
osm_vendor_ibumad.c: In function ‘osm_vendor_open_port’:
osm_vendor_ibumad.c:745:56: error: passing argument 2 of ‘umad_get_ca_portguids’ from incompatible pointer type [-Werror=incompatible-pointer-types]
   if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids,
                                                        ^~~~~~~~~
In file included from ../include/vendor/osm_vendor_ibumad.h:44,
                 from ../include/vendor/osm_vendor.h:65,
                 from ../include/opensm/osm_madw.h:52,
                 from osm_vendor_ibumad.c:66:
/usr/include/infiniband/umad.h:178:56: note: expected ‘__be64 *’ {aka ‘long long unsigned int *’} but argument is of type ‘ib_net64_t *’ {aka ‘long unsigned int *’}
 int umad_get_ca_portguids(const char *ca_name, __be64 *portguids, int max);
                                                ~~~~~~~~^~~~~~~~~
cc1: all warnings being treated as errors

Signed-off-by: Honggang Li <honli@xxxxxxxxxx>
---
 libvendor/osm_vendor_ibumad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvendor/osm_vendor_ibumad.c b/libvendor/osm_vendor_ibumad.c
index 92696d3e6086..6a3665be81f6 100644
--- a/libvendor/osm_vendor_ibumad.c
+++ b/libvendor/osm_vendor_ibumad.c
@@ -742,7 +742,7 @@ osm_vendor_open_port(IN osm_vendor_t * const p_vend,
 	}
 
 	for (ca = 0; ca < p_vend->ca_count; ca++) {
-		if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids,
+		if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], (__be64 *)portguids,
 					       OSM_UMAD_MAX_PORTS_PER_CA + 1)) < 0) {
 #ifdef __WIN__
 			OSM_LOG(p_vend->p_log, OSM_LOG_VERBOSE,
-- 
2.15.0-rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux