Add __attribute(format) to remove clang warnings/errors

Also fix a couple of spelling mistakes.

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>