fix -Wall compilation errors