[openib-general] Opensm - osm_sa_path_record.c - variable declaration

Yael Kalka yael at mellanox.co.il
Tue Sep 20 01:58:05 PDT 2005


Hi Hal,

I saw that in your code fixes of osm_sa_path_record.c you added some
variable declaration
in the middle of function (osm_pr_rcv_process - in the McastDest case).
Windows compiler does not enable declaration not in the beginning of the
function, so I would
like to have it changed. 
We can either move the declaration to the beginning of the function, or add
{} around the declaration.
Do you have a preference?
Yael


-----Original Message-----
From: Yael Kalka 
Sent: Tuesday, September 20, 2005 10:48 AM
To: halr at voltaire.com
Cc: openib-general at openib.org; Eitan Zahavi; Yael Kalka
Subject: [PATCH] Opensm - ignore strict-aliasing warning


Hi Hal,

Attached is a patch forcing the compiler not to do strict-aliasing
optimization on the opensm code, due to strict-aliasing warnings in our
code.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: opensm/Makefile.am
===================================================================
--- opensm/Makefile.am  (revision 3487)
+++ opensm/Makefile.am  (working copy)
@@ -64,7 +64,7 @@ opensm_SOURCES = main.c osm_db_files.c o
                 osm_ucast_mgr.c osm_ucast_updn.c \
                 osm_vl15intf.c osm_vl_arb_rcv.c\
                 osm_vl_arb_rcv_ctrl.c st.c
-opensm_CFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT $(DBGFLAGS)
-D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
+opensm_CFLAGS = -Wall $(OSMV_CFLAGS) -fno-strict-aliasing
-DVENDOR_RMPP_SUPPORT $(DBGFLAGS) -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
 opensm_CXXFLAGS = -Wall $(OSMV_CFLAGS) -DVENDOR_RMPP_SUPPORT $(DBGFLAGS)
-D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1
 
 # for linking with the simulator client library we have to use g++:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050920/6ebff064/attachment.html>


More information about the general mailing list