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  2017  2018  2019  <20202021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Two flavors of unused variable values
From: Karl Vestin via Core-talk <core-talk at aps.anl.gov>
To: "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Thu, 13 Feb 2020 11:22:26 +0000

Dear all,

 

Going through the Codacy logs and trying to filter out background noise I have come across two similar code patterns that are generating a fair number of issues:

 

1)      Variable 'var' is reassigned a value before the old one has been used.

2)      Variable 'varname' is assigned a value that is never used.

 

Often these unused variable values are of the type “status” or “counter” and may be useful for debugging.

 

In some code standards these patterns are banned. But my gut feeling is that we do not want to enforce that, hence I would propose we remove these rules for Codacy. Any opinions on this topic?

 

Karl Vestin

Group Leader Hardware and Integration

Integrated Control Systems Division

European Spallation Source ERIC

 

+46721792066

P.O Box 176, SE 221 00 Lund, Sweden

Visiting address: Odarslövsvägen 113, Lund

 


Replies:
Re: Two flavors of unused variable values Michael Davidsaver via Core-talk

Navigate by Date:
Prev: [Bug 1862917] Re: Possible memory leak in modules/database/src/std/link/lnkCalc.c Karl Vestin via Core-talk
Next: [Bug 1863088] [NEW] Mismatching printf format strings and arguments Karl Vestin via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
Navigate by Thread:
Prev: Build failed: EPICS Base base-7.0-525 AppVeyor via Core-talk
Next: Re: Two flavors of unused variable values Michael Davidsaver via Core-talk
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  <20202021  2022  2023  2024 
ANJ, 13 Feb 2020 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·