Fix some warnings found by higher warning levels than -Wall.