Fix various compile warnings (pedantic)