ID:13663 VHDL Subprogram Body error at <location>: function "<name>" does not always return a value

CAUSE: In a subprogram body at the specified location in a VHDL design file (.vhd), you failed to specify a return value for all paths through the statements in the subprogram body. For example, in the following code, the function returns a value for s = '0', but not for s = '1'.
ENTITY example IS
   PORT
   (
      a : IN     BIT;
      b : IN     BIT;
      o : OUT  BIT
   );
END example;

               
ARCHITECTURE a OF example IS
   FUNCTION exa (s,r : BIT) RETURN BIT IS
   BEGIN
      IF s = '0' THEN
         RETURN (s and r);
      END IF;
   END exa;
BEGIN
      o <= exa (s=>a, r=>b);
END a;

ACTION: Make sure the function returns a value in all paths through the statements in the subprogram body.