-
Notifications
You must be signed in to change notification settings - Fork 254
Turn some -Wunused-* diagnostics into errors, and solve them #1394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
fccf985 to
3a75e29
Compare
3a75e29 to
b6333f7
Compare
00303a2 to
1ce9318
Compare
|
This is good stuff, but I would really like to be able to see straight it's horrible to just see What can we do to improve that? I'd be ok with just having or implementing an 'always_unused', like Or even just putting a comment above the function. Yes, I could look it up, but that's an expensive context switch |
I think we shouldn't care what that unnamed argument is. We should think of it as "something that needs to be there because some function pointer demands it but we don't care about it at all". |
But that's not how the inquisitive human mind works. It'll be Anyway, I'll merge the pr, but am lodging my objection to that bit :) Thanks. |
Hmmm, I'll keep that partial objection in mind for the future, in case I have any better ideas. :) Thank you!
|
|
(I'm convinced you're working on it, but just to make sure, I was waiting |
Yup, I'm working on the rebase. :-) |
Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
[Serge: preference to keep the names as a comment, but ok] Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
[Serge: preference to keep the names as a comment, but ok] Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
…ompiled code Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
…lly-compiled code Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
Being a macro, the unused return value triggers a diagnostic. This probably needs further investigation, but we have the issue linked below for that. Link: <shadow-maint#1221> Reviewed-by: Serge Hallyn <[email protected]> Signed-off-by: Alejandro Colomar <[email protected]>
1ce9318 to
7c8c2b8
Compare
|
Done with the rebase, @hallyn. I included Reviewed-by's for you, and some notes about your preference. |
…iagnostics Signed-off-by: Alejandro Colomar <[email protected]>
|
Thanks |
This is a subset of -Werror=... #1220 at v24b.
Queued after Use const correctly. #1393.
Revisions:
v2
v2b
v3
v3b
v3c
v4
(void)0within _Generic(3) to avoid -Wunused-value diagnostics.