1 2 3 4 5 6 7 8 9 10 11
extern void pf(const char *msg, ...) __attribute__((format(printf, 1, 2))); static void test(int prec) { pf("%*s\n", prec, "xyz"); } /* * check-name: variadic formatting test dynamic precision * check-command: sparse -Wformat $file */