Fix compile warnings with -Wall