From 0b8f69b28ab13f5dc0ef5f44ce51fd7c7451a642 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sat, 20 Jul 2024 19:11:13 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20Clarify=20that=20G=5FGNUC=5FUNUSED=20ca?= =?UTF-8?q?n=E2=80=99t=20be=20used=20on=20definitions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only on declarations. This has now bitten me multiple times. Signed-off-by: Philip Withnall --- docs/reference/glib/macros.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/reference/glib/macros.md b/docs/reference/glib/macros.md index 2fea9db75..469ecdd1a 100644 --- a/docs/reference/glib/macros.md +++ b/docs/reference/glib/macros.md @@ -276,7 +276,8 @@ by application programmers. It avoids possible compiler warnings. For functions, place the attribute after the declaration, just before the - semicolon. For arguments, place the attribute at the beginning of the + semicolon. It cannot go in the definition of a function, only the + declaration. For arguments, place the attribute at the beginning of the argument declaration. void my_unused_function (G_GNUC_UNUSED gint unused_argument,