This message is generated when an expression to be compiled includes more than one point of return and not all of the points return an expression of the same type.
The return type can be _Integer, _Real, _Complex, or True|False, or arrays of _Integer, _Real, _Complex.
Off[message] switches off the message; On[message] switches it on. For example: Off[Compile::cret1].
Examples
Basic Examples(1)
One of the possible return types is an integer and the other possible return type is Boolean:
The compilation succeeds if all of the possible return values have the same type: