Fix -Wformat-security issues

Building with -Accflags="-Wformat -Werror=format-security"
triggers format string warnings from gcc.

As gcc can't tell that all the strings are constant here,
explicitly pass separate format strings to make it happy.