Fix some format specifier and mismatched type warnings