# VERILOG2141: All paths of a non-void function should return a value ## Summary ```{raw} html

Count: 1

ReliabilitySecurityMaintainabilityCode attributeEffort to fixTags
HIGH--Intentionality | Complete10minsynthesis, vscode, linter, simulation
``` ## Description ```{raw} html

Noncompliant code example

function int fly(input a);
  if (a) begin
    return 1;
  end
endfunction

Compliant solution

function int fly(input a);
  if (a) begin
    return 1;
  end else begin
    return 0;
  end
endfunction

A non-void function has return statements or assigns to its return value variable but does not do so on all control paths through the function.

``` ## Parameters No parameters. ```{raw} html ```