Merge "Fix undefined behavior (not returning a value from a function with return)." into lmp-dev