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.
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
Correct GCC warnings #798
Correct GCC warnings #798
Changes from all commits
4a3527b
45902f1
3bbf3ee
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this change did not break anything.
I wonder if this was done to please a specific compiler...
Do you know the reason @htibosch?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AniruddhaKanhere wrote:
The semicolon isn't necessary. It doesn't change the behaviour.
As you see this is a static assert of the expression
ipconfigETHERNET_MINIMUM_PACKET_BYTES <= baMINIMAL_BUFFER_SIZE
, wherebaMINIMAL_BUFFER_SIZE
uses the sizeof operator.I just tested these static asserts:
The compiler listed 2 failures:
ipconfigETHERNET_MINIMUM_PACKET_BYTES
is the minimum number of bytes in a packet on the wire. When necessary, the packet is extended with zero's in order to get the minimum length.baMINIMAL_BUFFER_SIZE
is the minimum number of bytes that are allocated in a network buffer.In the code, it is assumed that a network buffer always has enough space to store
ipconfigETHERNET_MINIMUM_PACKET_BYTES
bytes.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for documentation purposes: TI ARM CGT also complained about the semicolon.