EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Bug in dbUnitTest.c
From: Michael Davidsaver <[email protected]>
To: Andrew Johnson <[email protected]>
Cc: EPICS core-talk <[email protected]>
Date: Mon, 17 Apr 2017 18:49:02 -0400
oops, that's an easy one to slip through.

> OP_SYS_CFLAGS += -Werror=pointer-arith

Fine.  Even just '-Wpointer-arith' would be enough for me to notice bugs
like this, and won't break external builds.


On 04/17/2017 06:42 PM, Andrew Johnson wrote:
> Hi Michael,
> 
> Please fix the gcc-ism you introduced to the 3.15 branch in commit
> 8edefb9d which is currently causing all Jenkins' Windows builds to fail:
> 
> dbUnitTest.c: In function ‘testdbGetArrFieldEqual’:
> dbUnitTest.c:223:32: error: pointer of type ‘void *’ used in arithmetic
> [-Werror=pointer-arith]
>          for(n=0; n<N; n++, gbuf+=vSize, pbuf+=vSize) {
>                                 ^
> dbUnitTest.c:223:45: error: pointer of type ‘void *’ used in arithmetic
> [-Werror=pointer-arith]
>          for(n=0; n<N; n++, gbuf+=vSize, pbuf+=vSize) {
>                                              ^
> cc1: some warnings being treated as errors
> 
> http://stackoverflow.com/questions/3523145/pointer-arithmetic-for-void-pointer-in-c
> 
> 
> Another option now in my ~/configure/CONFIG_USER.Common.linux-x86_64 file:
> 
> ifdef BASE_3_15
>   OP_SYS_CFLAGS += -Werror=pointer-arith
>   OP_SYS_CFLAGS += -fvisibility=hidden
>   OP_SYS_CXXFLAGS += -fvisibility-inlines-hidden
> endif
> 
> - Andrew
> 


References:
Bug in dbUnitTest.c Andrew Johnson

Navigate by Date:
Prev: Bug in dbUnitTest.c Andrew Johnson
Next: Jenkins build became unstable: epics-base-3.15 #311 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Bug in dbUnitTest.c Andrew Johnson
Next: Jenkins build became unstable: epics-base-3.15 #311 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·