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

SafeRingBuffer.h compilation warning with 'All' #604

Closed
PhiJu5 opened this issue Feb 22, 2021 · 2 comments
Closed

SafeRingBuffer.h compilation warning with 'All' #604

PhiJu5 opened this issue Feb 22, 2021 · 2 comments

Comments

@PhiJu5
Copy link

PhiJu5 commented Feb 22, 2021

Is it possible to call return in a synchronized block ?

template
int SafeRingBufferN::read_char() {
synchronized {
return RingBufferN::read_char();
}
}

->
template
int SafeRingBufferN::read_char() {
int ret = 0;
synchronized {
ret = RingBufferN::read_char();
}
return ret;
}

At least this fix the compilation warning

Arduino15\packages\arduino\hardware\samd\1.8.11\cores\arduino\USB\SAMD21_USBDevice.h
uint32_t len = 0;
synchronized {
len = _rx_buffer.availableForStore();
}

@zfields
Copy link

zfields commented Mar 9, 2021

Resolved by #610

@facchinm
Copy link
Member

facchinm commented Apr 6, 2021

Fixed by #618

@facchinm facchinm closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants