X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tests%2Futils%2Ftap%2Ftap.h;h=0d6e66870fb924b6326349bff5f1e418f5c73677;hb=def9a4b6bcca64009858d82db137d0ae21696e40;hp=0f0594308ea27b20a207853bf7a05e1384b7d77b;hpb=1833a3d10994019aa035af4e0850890e9e66d8b0;p=babeltrace.git diff --git a/tests/utils/tap/tap.h b/tests/utils/tap/tap.h index 0f059430..0d6e6687 100644 --- a/tests/utils/tap/tap.h +++ b/tests/utils/tap/tap.h @@ -1,5 +1,6 @@ /*- * Copyright (c) 2004 Nik Clayton + * 2017 Jérémie Galarneau * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -73,17 +74,29 @@ #define skip_end() } while(0); -unsigned int _gen_result(int, const char *, char *, unsigned int, char *, ...); +#ifdef __MINGW_PRINTF_FORMAT +# define TAP_PRINTF_FORMAT __MINGW_PRINTF_FORMAT +#else +# define TAP_PRINTF_FORMAT printf +#endif + +__attribute__((format(TAP_PRINTF_FORMAT, 5, 6))) +unsigned int _gen_result(int, const char *, const char *, unsigned int, const char *, ...); int plan_no_plan(void); -int plan_skip_all(char *); +__attribute__((noreturn)) +int plan_skip_all(const char *); int plan_tests(unsigned int); -unsigned int diag(char *, ...); +__attribute__((format(TAP_PRINTF_FORMAT, 1, 2))) +unsigned int diag(const char *, ...); +void diag_multiline(const char *); -int skip(unsigned int, char *, ...); +__attribute__((format(TAP_PRINTF_FORMAT, 2, 3))) +int skip(unsigned int, const char *, ...); -void todo_start(char *, ...); +__attribute__((format(TAP_PRINTF_FORMAT, 1, 2))) +void todo_start(const char *, ...); void todo_end(void); int exit_status(void);