Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/atf turn on printf warnings for all the printf-...
details: https://anonhg.NetBSD.org/src/rev/193d98b9d622
branches: trunk
changeset: 765946:193d98b9d622
user: christos <christos%NetBSD.org@localhost>
date: Sat Jun 11 18:03:57 2011 +0000
description:
turn on printf warnings for all the printf-like atf functions.
diffstat:
external/bsd/atf/dist/atf-c/defs.h.in | 1 +
external/bsd/atf/dist/atf-c/tc.h | 35 +++++++++++++++++++++++----------
external/bsd/atf/lib/libatf-c/Makefile | 7 +++--
3 files changed, 29 insertions(+), 14 deletions(-)
diffs (81 lines):
diff -r e02f502778f9 -r 193d98b9d622 external/bsd/atf/dist/atf-c/defs.h.in
--- a/external/bsd/atf/dist/atf-c/defs.h.in Sat Jun 11 18:03:17 2011 +0000
+++ b/external/bsd/atf/dist/atf-c/defs.h.in Sat Jun 11 18:03:57 2011 +0000
@@ -31,5 +31,6 @@
#define ATF_C_DEFS_H
#define ATF_DEFS_ATTRIBUTE_NORETURN @ATTRIBUTE_NORETURN@
+#define ATF_DEFS_ATTRIBUTE_PRINTF(a,b) @ATTRIBUTE_PRINTF(a,b)@
#endif /* !defined(ATF_C_DEFS_H) */
diff -r e02f502778f9 -r 193d98b9d622 external/bsd/atf/dist/atf-c/tc.h
--- a/external/bsd/atf/dist/atf-c/tc.h Sat Jun 11 18:03:17 2011 +0000
+++ b/external/bsd/atf/dist/atf-c/tc.h Sat Jun 11 18:03:57 2011 +0000
@@ -103,22 +103,35 @@
atf_error_t atf_tc_cleanup(const atf_tc_t *);
/* To be run from test case bodies only. */
-void atf_tc_fail(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN;
-void atf_tc_fail_nonfatal(const char *, ...);
-void atf_tc_pass(void) ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_fail(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2)
+ ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_fail_nonfatal(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+void atf_tc_pass(void)
+ ATF_DEFS_ATTRIBUTE_NORETURN;
void atf_tc_require_prog(const char *);
-void atf_tc_skip(const char *, ...) ATF_DEFS_ATTRIBUTE_NORETURN;
+void atf_tc_skip(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2)
+ ATF_DEFS_ATTRIBUTE_NORETURN;
void atf_tc_expect_pass(void);
-void atf_tc_expect_fail(const char *, ...);
-void atf_tc_expect_exit(const int, const char *, ...);
-void atf_tc_expect_signal(const int, const char *, ...);
-void atf_tc_expect_death(const char *, ...);
-void atf_tc_expect_timeout(const char *, ...);
+void atf_tc_expect_fail(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+void atf_tc_expect_exit(const int, const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(2, 3);
+void atf_tc_expect_signal(const int, const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(2, 3);
+void atf_tc_expect_death(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
+void atf_tc_expect_timeout(const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(1, 2);
/* To be run from test case bodies only; internal to macros.h. */
-void atf_tc_fail_check(const char *, const size_t, const char *, ...);
+void atf_tc_fail_check(const char *, const size_t, const char *, ...)
+ ATF_DEFS_ATTRIBUTE_PRINTF(3, 4);
void atf_tc_fail_requirement(const char *, const size_t, const char *, ...)
- ATF_DEFS_ATTRIBUTE_NORETURN;
+ ATF_DEFS_ATTRIBUTE_PRINTF(3, 4)
+ ATF_DEFS_ATTRIBUTE_NORETURN;
void atf_tc_check_errno(const char *, const size_t, const int,
const char *, const bool);
void atf_tc_require_errno(const char *, const size_t, const int,
diff -r e02f502778f9 -r 193d98b9d622 external/bsd/atf/lib/libatf-c/Makefile
--- a/external/bsd/atf/lib/libatf-c/Makefile Sat Jun 11 18:03:17 2011 +0000
+++ b/external/bsd/atf/lib/libatf-c/Makefile Sat Jun 11 18:03:57 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2011/03/31 16:45:44 jmmv Exp $
+# $NetBSD: Makefile,v 1.11 2011/06/11 18:03:57 christos Exp $
NOLINT= # defined
@@ -75,8 +75,9 @@
CLEANFILES+= defs.h
defs.h: defs.h.in
- ${TOOL_SED} -e \
- 's,@ATTRIBUTE_NORETURN@,__attribute__((__noreturn__)),g' \
+ ${TOOL_SED} \
+ -e 's|@ATTRIBUTE_NORETURN@|__attribute__((__noreturn__))|g' \
+ -e 's|@ATTRIBUTE_PRINTF(a,b)@|__attribute__((__format__(__printf__,a,b)))|g' \
< ${.ALLSRC} > ${.TARGET}.tmp
mv ${.TARGET}.tmp ${.TARGET}
Home |
Main Index |
Thread Index |
Old Index