EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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

Subject: Resolved narrowing conversion error while compiling quadEM module
From: Mrinal Bera via Tech-talk <tech-talk at aps.anl.gov>
To: Tech-talk <tech-talk at aps.anl.gov>
Date: Tue, 7 Nov 2023 15:37:08 +0000
Dear friends,

While compiling either of quadEM-R9-2-1 or quadEM-R9-4 with EPICS bas-7.0.7 in Centos 9 Stream, I was getting the following narrowing conversion error:

../drvTetrAMM.cpp: In member function ‘void drvTetrAMM::readThread()’:

../drvTetrAMM.cpp:268:22: error: narrowing conversion of ‘18443366386873925631’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  268 |                 case 0xfff40002ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:273:22: error: narrowing conversion of ‘18443366378283991039’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  273 |                 case 0xfff40000ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:283:22: error: narrowing conversion of ‘18443366382578958335’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  283 |                 case 0xfff40001ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

../drvTetrAMM.cpp:296:22: error: narrowing conversion of ‘18443366391168892927’ from ‘long long unsigned int’ to ‘long long int’ [-Wnarrowing]

  296 |                 case 0xfff40003ffffffffll:

      |                      ^~~~~~~~~~~~~~~~~~~~

make[3]: *** [/usr/local/epics/base/configure/RULES_BUILD:267: drvTetrAMM.o] Error 1

make[3]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp/src/O.linux-x86_64'

make[2]: *** [/usr/local/epics/base/configure/RULES_ARCHS:58: install.linux-x86_64] Error 2

make[2]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp/src'

make[1]: *** [/usr/local/epics/base/configure/RULES_DIRS:85: src.install] Error 2

make[1]: Leaving directory '/home/epics/chemmatCARS/synApps/support/quadEM-R9-4/quadEMApp'

make: *** [/usr/local/epics/base/configure/RULES_DIRS:85: quadEMApp.install] Error 2

 

I resolved the errors by changing line #193 of quadEM-R9-2-1 or line #191 of quadEM-R9-4 from

long long lastValue;

to

unsigned long long lastValue;


I hope this will be helpful to someone getting similar errors.


Thanks,

Mrinal




Replies:
RE: Resolved narrowing conversion error while compiling quadEM module Mark Rivers via Tech-talk

Navigate by Date:
Prev: 回覆: A Modbus problem relating to byte order and endian Chiang, Liang-Chih [江良志] via Tech-talk
Next: Re: Olog usage Timo Korhonen via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
Navigate by Thread:
Prev: 回覆: A Modbus problem relating to byte order and endian Chiang, Liang-Chih [江良志] via Tech-talk
Next: RE: Resolved narrowing conversion error while compiling quadEM module Mark Rivers via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  <20232024 
ANJ, 07 Nov 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·