fix "-Wint-to-pointer-cast"
fix "-Wunused-but-set-variable"
fix "-Wpointer-sign"
fix "assignment discards 'const' qualifier"
fix "-Wunused-variable"
fix "passing argument from incompatible pointer type"