Skip to content

Fix unused variable warnings#317

Open
yetist wants to merge 1 commit intomasterfrom
pr-unused
Open

Fix unused variable warnings#317
yetist wants to merge 1 commit intomasterfrom
pr-unused

Conversation

@yetist
Copy link
Copy Markdown
Member

@yetist yetist commented Apr 7, 2025

Fix unused variable warnings with G_GNUC_UNUSED.

@lukefromdc
Copy link
Copy Markdown
Member

lukefromdc commented Apr 7, 2025 via email

@cwendling
Copy link
Copy Markdown
Member

@lukefromdc each instance should be reviewed, but as those are parameters (not variables) they are part of that function's API. If it's used as a callback or virtual function, the signature has to match what the callers use, whether it's used or not. It's very common in GObject code to have unused parameters because it heavily relies on callbacks and virtual functions, but not all parameters are needed for all cases.

I'm wondering if doing this makes much sense because of this BTW: does this change get rid of everything? And do we want to have G_GNUC_UNUSEDs everywhere, or simply recommend -Wno-unused-parameter for regular builds?

@lukefromdc
Copy link
Copy Markdown
Member

lukefromdc commented Apr 9, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants