Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: Bug in dbUnitTest.c
From: Michael Davidsaver <mdavidsaver@gmail.com>
To: Andrew Johnson <anj@aps.anl.gov>
Cc: EPICS core-talk <core-talk@aps.anl.gov>
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  <2017
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  <2017
ANJ, 17 Apr 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·