Corrected several format-string errors through the code

- Functions that expect a printf-style format string are now marked as
  such, so that gcc/clang will emit a warning warn you if you mismatch
  format string and arguments.

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