Why is this an issue?

A function that does not always return a value is likely a coding mistake. All paths of a function should return a value.

How to fix it

Code examples

Noncompliant code example

function my_function (i : in integer) return std_logic is
begin
  if i > 5 then
    return '0';
  end if;
end;

Compliant solution

function my_function (i : in integer) return std_logic is
begin
  if i > 5 then
    return '0';
  else
    return '1';
  end if;
end;