Fix misplaced cast that was breaking Uno/Mega.

Also a few other warning-related cleanups.