RE: rdma-core compiler warnings on RHEL6.8

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

 



> 
> If you can make a simple test program that triggers the above warning
> send it to me and I will make cmake turn off strict aliasing globally if
the
> compiler is too old..
> 
> Jason
>

Hey Jason,

Attached is bar.c, that if you build in libibverbs/examples, will show these
two warnings.  

EG:

index dc4c497..84b5813 100644
--- a/libibverbs/examples/CMakeLists.txt
+++ b/libibverbs/examples/CMakeLists.txt
@@ -26,3 +26,4 @@ target_link_libraries(ibv_ud_pingpong LINK_PRIVATE ibverbs
ibverbs_tools)

 rdma_executable(ibv_xsrq_pingpong xsrq_pingpong.c)
 target_link_libraries(ibv_xsrq_pingpong LINK_PRIVATE ibverbs ibverbs_tools)
+rdma_executable(bar bar.c)

----

 [ 84%] Building C object libibverbs/examples/CMakeFiles/bar.dir/bar.c.o
/root/stevo/rdma-core/libibverbs/examples/bar.c: In function 'bar':
/root/stevo/rdma-core/libibverbs/examples/bar.c:67: warning: comparison of
unsigned expression < 0 is always false
/root/stevo/rdma-core/libibverbs/examples/bar.c: In function 'main':
/root/stevo/rdma-core/libibverbs/examples/bar.c:43: warning: dereferencing
pointer 'sgid.103' does break strict-aliasing rules
/root/stevo/rdma-core/libibverbs/examples/bar.c:42: warning: dereferencing
pointer 'sgid.103' does break strict-aliasing rules
/root/stevo/rdma-core/libibverbs/examples/bar.c:41: warning: dereferencing
pointer 'sgid.103' does break strict-aliasing rules
/root/stevo/rdma-core/libibverbs/examples/bar.c:44: warning: dereferencing
pointer 'sgid.103' does break strict-aliasing rules
/root/stevo/rdma-core/libibverbs/examples/bar.c:51: note: initialized from
here
Linking C executable ../../bin/bar

---

Thanks!

Steve.

Attachment: bar.c
Description: Binary data


[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