Examples of errors detected by the V3137 diagnostic


V3137. The variable is assigned but is not used by the end of the function.


Roslyn Analyzers

V3137 The 'sourceOrigins' variable is assigned but is not used by the end of the function. TaintedDataAnalysis.TaintedDataOperationVisitor.cs 328


public override TaintedDataAbstractValue VisitArrayInitializer(
  IArrayInitializerOperation operation,
  object argument)
{
  HashSet<SymbolAccess> sourceOrigins = null;
  ....
  if (baseAbstractValue.Kind == TaintedDataAbstractValueKind.Tainted)
  {
     sourceOrigins = new HashSet<SymbolAccess>(....);
  }
  ....
}


Bugs Found

Checked Projects
355
Collected Errors
13 303