V3137. The variable is assigned but is not used by the end of the function.
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>(....);
}
....
}
V3137 The 'apiVersionSetId' variable is assigned but is not used by the end of the function. GetAzureApiManagementApiVersionSet.cs 69
public String ApiVersionSetId { get; set; }
....
public override void ExecuteApiManagementCmdlet()
{
....
string apiVersionSetId;
if (ParameterSetName.Equals(ContextParameterSet))
{
....
apiVersionSetId = ApiVersionSetId;
}
else
{
apiVersionSetId = ....;
}
if (string.IsNullOrEmpty(ApiVersionSetId)) // <=
{
WriteObject(....);
}
else
{
WriteObject(Client.GetApiVersionSet(...., ApiVersionSetId)) // <=
}
}
Similar errors can be found in some other places:
V3137 The 'leftMargin' variable is assigned but is not used by the end of the function. DragDrop.cs 87
internal static void StartDrag(....)
{
....
if (frameworkElementSource != null)
{
leftMargin = frameworkElementSource.Margin.Left; // <=
topMargin = frameworkElementSource.Margin.Top; // <=
}
if (dragDropElement == null ||
!dragDropElement.CanStartDrag(trigger, initializeContext))
{
return;
}
var context = dragDropElement
.DragStarting(trigger, initializeContext);
if (context == null)
{
return;
}
var startDragPosition = e.GetCurrentPoint(context.DragSurface.RootElement)
.Position;
var relativeStartDragPosition = e.GetCurrentPoint(uiDragDropElement)
.Position;
var dragPositionMode = DragDrop.GetDragPositionMode(uiDragDropElement);
AddOperation(new DragDropOperation(context,
dragDropElement,
dragPositionMode,
e.Pointer,
startDragPosition,
relativeStartDragPosition));
}
Similar errors can be found in some other places:
If you feel like the New Year just came, and you missed the first half of January, then all this ...