EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: 'type-punned pointer' warning patch
From: Eric Norum <[email protected]>
To: "'[email protected]'" <[email protected]>
Cc: "Ernest L. Williams Jr." <[email protected]>
Date: Tue, 22 Mar 2005 18:45:37 -0600
"Ernest L. Williams Jr." <[email protected]> wrote:

Also, a patch file to get rid of the following warning. :)
=======================================================================
warning: dereferencing type-punned pointer will break strict-aliasing
rules


Index: ./src/libCom/misc/epicsExport.h
===================================================================
RCS file: /net/phoebus/epicsmgr/cvsroot/epics/base/src/libCom/misc/ epicsExport.h,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -r1.1.2.3 -r1.1.2.4
--- ./src/libCom/misc/epicsExport.h 30 Mar 2004 21:56:23 -0000 1.1.2.3
+++ ./src/libCom/misc/epicsExport.h 18 Feb 2005 22:03:24 -0000 1.1.2.4
@@ -26,7 +26,7 @@


 #define epicsExportAddress(typ,obj) \
 epicsShareExtern typ *EPICS_EXPORT_POBJ(typ,obj); \
-epicsShareDef typ *EPICS_EXPORT_POBJ(typ,obj) = (typ *)&obj
+epicsShareDef typ *EPICS_EXPORT_POBJ(typ,obj) = (typ *)(char *)&obj

#define epicsExportRegistrar(func) \
epicsShareFunc REGISTRAR EPICS_EXPORT_PFUNC(func) = (REGISTRAR)(void*)&func


--
Eric Norum <[email protected]>
Advanced Photon Source
Argonne National Laboratory
(630) 252-4793



Navigate by Date:
Prev: Re: Support for room temperature and humidity sensors J. Lewis Muir
Next: RE: CA Connect rates under RTEMS Feng, Shuchen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: CA gateway failure Kenneth Evans, Jr.
Next: 3.14.6/asyn/vxi11 crash Laznovsky, Michael
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  <20052006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·