Add -Wextra and -Wpedantic
Fix mismatched types in comparison
Fix mismatched types in comparison