Corrected several format-string errors through the code

- Functions that expect a printf-style format string are now marked as
  such, and gcc/clang will do their best to warn you if you mismatch
  format string and arguments. This has no effect in MSVC.

Signed-off-by: Haru <haru@dotalux.com>