Add printf format attributes & fix the warnings.

3 files changed