You don't show the type of the enclosing function.
If the the enclosing function is type int (like main), that statement generates a compiler warning because the type of the return (void) does not match the type of the function.
If the enclosing function is of type void, then the return is okay and returns nothing.