Merge pull request #784 from 3d-gussner/MK3_fix2
Fixed unused variable c as in pull request #138
This commit is contained in:
commit
d70d38bb0c
@ -131,7 +131,7 @@ class MarlinSerial //: public Stream
|
|||||||
if (M_UCSRxA & (1<<M_FEx)) {
|
if (M_UCSRxA & (1<<M_FEx)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
||||||
volatile unsigned char c = M_UDRx;
|
(void)(*(char *)M_UDRx);
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = M_UDRx;
|
unsigned char c = M_UDRx;
|
||||||
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
||||||
@ -155,7 +155,7 @@ class MarlinSerial //: public Stream
|
|||||||
if (UCSR1A & (1<<FE1)) {
|
if (UCSR1A & (1<<FE1)) {
|
||||||
// Characters received with the framing errors will be ignored.
|
// Characters received with the framing errors will be ignored.
|
||||||
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
// The temporary variable "c" was made volatile, so the compiler does not optimize this out.
|
||||||
volatile unsigned char c = UDR1;
|
(void)(*(char *)UDR1);
|
||||||
} else {
|
} else {
|
||||||
unsigned char c = UDR1;
|
unsigned char c = UDR1;
|
||||||
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
int i = (unsigned int)(rx_buffer.head + 1) % RX_BUFFER_SIZE;
|
||||||
|
Loading…
Reference in New Issue
Block a user