Fix codegen for break

break in function is not treated correctly
Remove all warnings on compilation