Fixes for some of the compile warnings (-Wall -pedantic). #84
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.