mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 20:46:14 +01:00
docs: Clarify that G_GNUC_UNUSED can’t be used on definitions
Only on declarations. This has now bitten me multiple times. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
107b47226c
commit
0b8f69b28a
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user