Skip to content
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

Fix to cast in changes for SYS_READ. #731

Merged
merged 9 commits into from
Aug 1, 2018
Merged

Conversation

donmr
Copy link
Contributor

@donmr donmr commented Jul 29, 2018

As slyshykO notes in #729, read_result is a signed type so the -1 constant should not be cast to unsigned.
I belive compilers will be happy with this without any cast.

donmr and others added 9 commits July 26, 2018 09:02
of a file.  fread (on stm32) get them (say 3 bytes), then askes for
more.  do_semihosting gets a read return of 0 and tries to write that.
mem_write alters the address to be aligned and overwrites then 3 bytes
from the last read.

This change simply tells mem_write to do nothing if len is 0.
Fixes to SYS_READ changes in PR stlink-org#727 per review. (stlink-org#729)
and the compiler should be fine with that without any cast.
@xor-gate
Copy link
Member

xor-gate commented Aug 1, 2018

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants