Due SAM Core -Remove compiler Warning and improve readability plus simple documentation fix #4447
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.
Discovered a core library warning of signed/unsigned comparison, which at first wa confusing due to font as one variable being 'l' lower case L, actually looked like a number one ('1'). Discovered this temporary variable was actually unsigned being compared to unsigned buffer variables.
This can be tested and found compiling using ALL warnings on Arduino 1.6.7 and Due Board Manager V1.6.6,. Noting that repository has more up to date Stream.cpp to avoid another compiler error that can be seen. Simple empty sketch (empty setup and loop) will show this
This is simple fix in UARTClass.cpp to
1/ Correct temporary variable to signed to match other variable and other similar comparisons in module.
2/ Change variable name to nextWrite for better readability
Other change is to remove questionable wording comment for RingBuffer.h, that implies no one knows what the definition is for.