Fixes for some of the compile warnings (-Wall -pedantic).#84
Open
folkertvanheusden wants to merge 2 commits intolinux-usb-gadgets:masterfrom
Open
Fixes for some of the compile warnings (-Wall -pedantic).#84folkertvanheusden wants to merge 2 commits intolinux-usb-gadgets:masterfrom
folkertvanheusden wants to merge 2 commits intolinux-usb-gadgets:masterfrom
Conversation
Contributor
|
I took this partially . Could you rebase. Thanks! |
Contributor
Author
|
done
…On Tue, Sep 24, 2024 at 11:48 PM Michael Grzeschik ***@***.***> wrote:
I took this partially . Could you rebase. Thanks!
—
Reply to this email directly, view it on GitHub
<#84 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUN5IW2ANEMOFEHY4SODUJDZYHMZXAVCNFSM6AAAAABOZGP7OWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZSGQ2DOOJVHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes some of the compile warnings.
examples/gadget-hid.c was just a matter of some casting, examples/gadget-vid-pid-remove.c was a bug, most others were stray ';'.
Two important things:
the test set complains about 10 failed tests before my changes and also (same) 10 after
I did not understand container_of and ARRAY_SIZE_SENTINEL
First container_of:
member is assigned the contents of 'ptr' with a typeof but in the line after that, member is casted to char * anyway?
ARRAY_SIZE_SENTINEL: what is it for? It is instantiated 4 times but never referenced. Also it has the 'unused' attribute. So why bother? I disabled (not removed) it for now as compiling it produces warnings about 0-sized arrays.