VERILOG2002: Unused task or function formal arguments should be removed

Summary

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
MEDIUM--Intentionality | Logical10minsynthesis, vscode, simulation, linter, dead-code

Description

Unused task or function formal arguments should be removed.

Noncompliant code example

function [7:0] sum (input [7:0] a, b, c); // Noncompliant: 'c' is unused
  begin
    sum = a + b;
  end
endfunction

task [7:0] sum;
  input [7:0] a, b;
  output [7:0] c, d; // Noncompliant: 'd' is unused
  begin
    c = a + b;
  end
endtask

Compliant solution

function [7:0] sum (input [7:0] a, b);
  begin
    sum = a + b;
  end
endfunction

task [7:0] sum;
  input [7:0] a, b;
  output [7:0] c;
  begin
    c = a + b;
  end
endtask

Parameters

No parameters.