Why is this an issue?

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.

How to fix it

Code examples

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