Fix IAR error on memcpy and warnings.#571
Merged
Merged
Conversation
hathach
reviewed
Dec 18, 2020
Owner
hathach
left a comment
There was a problem hiding this comment.
Thanks for the pr, look great, I only want to slightly make it more portable without uintptr_t
|
|
||
| // Write data wrapped around | ||
| memcpy(f->buffer, data + nLin*f->item_size, (n - nLin) * f->item_size); | ||
| memcpy(f->buffer, (uint8_t*)((uintptr_t)data + nLin*f->item_size), (n - nLin) * f->item_size); |
Owner
There was a problem hiding this comment.
Maybe only ((uint8_t const*) data) + nLin*item_size) is good enough. I am not entirely sure but uintptr_t seems to be optional type for some platforms. Best to keep it as portable as possible
|
|
||
| // Read data wrapped part | ||
| memcpy(p_buffer + nLin*f->item_size, f->buffer, (n - nLin) * f->item_size); | ||
| memcpy((uint8_t*)((uintptr_t)p_buffer + nLin*f->item_size), f->buffer, (n - nLin) * f->item_size); |
Collaborator
Author
Done |
hathach
reviewed
Dec 22, 2020
Signed-off-by: MasterPhi <admin@hifiphile.com>
hathach
approved these changes
Dec 24, 2020
Owner
hathach
left a comment
There was a problem hiding this comment.
superb !! Thank you for your effort for fixing IAR compiling.
7FM
pushed a commit
to 7FM/tinyusb
that referenced
this pull request
Aug 23, 2025
Fixes build when pico_stdlib isn't included in the target libraries: pico-sdk/src/rp2_common/pico_divider/divider.S:8:10: fatal error: hardware/divider_helper.S: No such file or directory Also fixes the same error in pico_double, though I'm not sure how/why: pico-sdk/src/rp2_common/pico_double/double_aeabi.S:9:10: fatal error: hardware/divider_helper.S: No such file or directory
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.
Signed-off-by: MasterPhi admin@hifiphile.com
Describe the PR
IAR complains on "unknown type" on memcpy, and gives warnings on undefined volatile access order
A clear and concise description of what this PR solve.