Skip to content

SafeRingBuffer.h compilation warning with 'All' #604

Closed
@PhiJu5

Description

@PhiJu5

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();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions