documented the usage of PRINTF_FMT and PRINTF_FMT_ATTR().
cosmetics.
added an assertion.
added an assertion to clear a potential bug reported by static analysis.