17.2.10 Format_arg Function Attribute
The
format_arg attribute specifies that a
function manipulates a printf style format string and that
the compiler should check the format string for consistency. The
index parameter gives the
position of the format string in the parameter list of the function,
numbered from the left beginning at index 1. For
example:extern char * __attribute__ ((format_arg (2))) my_foo (char *my_str, const char *my_format);