fix compiler warnings on gcc -Wall