Functions should only contain one single return statement.
function my_function(z : boolean) return std_logic is
begin
if z then
return '1';
else
return '0';
end if;
end;
function my_function(z : boolean) return std_logic is
variable tmp : std_logic;
begin
if z then
tmp := '1';
else
tmp := '0';
end if;
return tmp; -- Compliant
end;