Martin Milata <mmilata(a)redhat.com> writes:
Related to rhbz#951520.
Signed-off-by: Martin Milata <mmilata(a)redhat.com>
---
lib/strbuf.h | 4 ++--
lib/utils.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/strbuf.h b/lib/strbuf.h
index 9a5091f..66a9a2c 100644
--- a/lib/strbuf.h
+++ b/lib/strbuf.h
@@ -116,7 +116,7 @@ btp_strbuf_prepend_str(struct btp_strbuf *strbuf,
*/
struct btp_strbuf *
btp_strbuf_append_strf(struct btp_strbuf *strbuf,
- const char *format, ...);
+ const char *format, ...) __attribute__((format(printf, 2, 3)));
I'm using
#define __printf(x, y) __attribute__((format(printf, (x), (y))))
less typing, same information and also that gives you you possibility to
turn it off when compilers do not know __attribute__, which should not
happen.
#ifdef STUPID_COMPILER
# define __printf(x, y)
#else
# define __printf(x, y) __attribute__((format(printf, (x), (y))))
#endif
--
Nikola