[openib-general] Re: Opensm - osm_sa_path_record.c - variable declaration
Hal Rosenstock
halr at voltaire.com
Tue Sep 20 02:09:19 PDT 2005
Hi Yael,
On Tue, 2005-09-20 at 04:58, Yael Kalka wrote:
> 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.
Please note that I don't have a Windows environment for OpenSM
development.
> Do you have a preference?
Ny preference would be the latter.
-- Hal
> 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++:
>
More information about the general
mailing list