If the printf attribute is only present next to the function's
definition, the compiler only checks the calls in the same compilation
unit.
In order to verify all the calls, annotate the declaration of
_test_print_failed() in gpiod-test.h.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
globals.num_tests++;
}
-TEST_PRINTF(1, 2) void _test_print_failed(const char *fmt, ...)
+void _test_print_failed(const char *fmt, ...)
{
int status;
va_list va;
};
void _test_register(struct _test_case *test);
-void _test_print_failed(const char *fmt, ...);
+void _test_print_failed(const char *fmt, ...) TEST_PRINTF(1, 2);
/*
* This macro should be used for code brevity instead of manually declaring