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.
function int fly(input a);
if (a) begin
return 1;
end
endfunction
function int fly(input a);
if (a) begin
return 1;
end else begin
return 0;
end
endfunction