Move the clearing of mm for modeA/C

Only clear mm after we are sure we have got a Mode A/C. This reduces
processor load.

Also tidy up some Linux compiler warnings that result from the last
change.