﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3954	Potential bugs from static code analysis	Henning Kiel	Lennart Ochel	"I'm referencing from run ""Tue Jun 7 21:05:18 2016"" with 3483 warnings
(approx. commit bb33335a639ba7a14c88f997355f1d41bfe37589)

I wonder if 3rdParty code should be checked, because we cannot do anything about it, right?

[ ] 1. virtually all files
(this is not a bug, but superfluous code, slowing down C compiler)
Common problem with match expressions ""Value stored to 'tmp4' is never read"" (because of failure handling?) creates hundreds of warnings and makes this static analysis difficult to read

[x] 2. Absyn.mo 3584
value stored to l2 is never read -> getCrefFromExp() stop expression is lost

[ ] 3. BackendDAEOptimize.mo 1763
value stored to compInfos is never read -> info from called function is lost,  function returns defaults only

[x] 4. BackendDAEOptimize.mo 879
value stored to lsteqns is never read -> BackendEquation.equationList(eqns) called twice

[ ] 5. BackendDAEOptimize.mo 4350
value stored in expLst is never read -> list obtained from right side is directly overwritten by empty list

[ ] 6. BackendDAEDump.mo 888
value stored in expLst is never read -> string with equationKindString is not used

[ ] 7. BackendEquation.mo 1066,1055,1042
use of uninitialized variable b

[ ] 8. BackendInline.mo 792
output variable outEquationArray not initialized

[ ] 9. BackendVariable.mo 2891,2882,2898
value stored in res is never read -> call to replaceVarWithWholeDimSubs() seems useless

[ ] 10. BaseHashTable.mo 213
value stored in n is never read -> valueArrayLength() explicitly read but not used

[ ] 11. CevalFunction.mo 2672
value stored in deps is never read -> is this wanted?

[ ] 12. CevalFunction.mo 2310,1976,2280
value stored in cache is never read -> should following functions start with inCache or cache from previous call?

[ ] 13. Differentiate.mo 3052
lowerVarsElementVars() called with too few return elements

[ ] 14. EvaluateFunctions.mo 3383
returned list from List.filterOnTrue(varLst, BackendVariable.isStateorStateDerVar); is not used (and called function may not fail) -> superfluous?

[ ] 15. EvaluateFunctions.mo 1370
value of cref1 is overwriten 7 lines below

[ ] 16. Matching.mo 3867
value stored to unmatched is never read. Maybe typo in next line that should use unmatched instead of unmatchedRows (otherwise this listAppend() is superfluous)

[ ] 17. RemoveSimpleEquations.mo 3766
variable varlst is overwritten, maybe that should be iAcc = ??? And the recursion should use varlst (rest of list) and iAcc as parameters.

[ ] 18. ResolveLoops.mo 2456-2460
arrays e, u, v, vv and w are created but not used

[ ] 19. ResolveLoops.mo 1792+1793
arrays ass1 and ass2 are created, but not used

[ ] 20. ResolveLoops.mo 1564,1580
startNode/endNode is calculated twice with different rule



More to come (checked Compiler/boot/build/*.c alphabetically up to and including ResolveLoops.c, skipped HpcOM* and FFrontEnd)

Items marked with [x] are already fixed."	defect	new	normal	Future	Code Generation	v1.10.0-dev-nightly			Martin Sjölund Adrian Pop
