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: Re: Two flavors of unused variable values
From: Michael Davidsaver via Core-talk <core-talk at aps.anl.gov>
To: Karl Vestin <karl.vestin at ess.eu>, "core-talk at aps.anl.gov" <core-talk at aps.anl.gov>
Date: Thu, 13 Feb 2020 12:24:24 +0000
On 2/13/20 3:22 AM, Karl Vestin via Core-talk wrote:
> 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?

Simply from the prospective of priority I would agree.


> *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
> 
>  
> 


References:
Two flavors of unused variable values Karl Vestin via Core-talk

Navigate by Date:
Prev: [Bug 1863088] [NEW] Mismatching printf format strings and arguments Karl Vestin via Core-talk
Next: [Bug 1863118] [NEW] Possible null pointer dereferencing in modules/libcom/src/osi/os/WIN32/osdThread.c 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: Two flavors of unused variable values 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 
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 ·