From 6cc9b74e0e7b2f7dde443a4bca06f3435d70235e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A1n=20Tomko?=
Date: Fri, 18 Oct 2019 23:16:46 +0200
Subject: [PATCH] docs: hacking: remove reference to ATTRIBUTE_FORMAT
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Prefer G_GNUC_PRINTF.
Also, pick another example than virAsprintf since it may get
removed in the future.
Signed-off-by: Ján Tomko
Reviewed-by: Daniel P. Berrangé
Reviewed-by: Andrea Bolognani
---
docs/hacking.html.in | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/hacking.html.in b/docs/hacking.html.in
index 01c735120a..030d7818e3 100644
--- a/docs/hacking.html.in
+++ b/docs/hacking.html.in
@@ -1379,12 +1379,12 @@ BAD:
Whenever you add a new printf-style function, i.e., one with a format
string argument and following "..." in its prototype, be sure to use
gcc's printf attribute directive in the prototype. For example, here's
- the one for virAsprintf, in util.h:
+ the one for virCommandAddEnvFormat in vircommand.h:
- int virAsprintf(char **strp, const char *fmt, ...)
- ATTRIBUTE_FORMAT(printf, 2, 3);
+ void virCommandAddEnvFormat(virCommandPtr cmd, const char *format, ...)
+ G_GNUC_PRINTF(2, 3);