Fix compiler warnings spotted by Jonatan Lindblad.