mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_RCProtocol: get rid of compiler warning from clang about unknown warning group -Wswitch-unreachable
This commit is contained in:
parent
f161d5745e
commit
b4df082618
@ -128,11 +128,13 @@ public:
|
|||||||
_disabled_for_pulses |= (1U<<(uint8_t)protocol);
|
_disabled_for_pulses |= (1U<<(uint8_t)protocol);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(__clang__)
|
||||||
// in the case we've disabled most backends then the "return true" in
|
// in the case we've disabled most backends then the "return true" in
|
||||||
// the following method can never be reached, and the compiler gets
|
// the following method can never be reached, and the compiler gets
|
||||||
// annoyed at that.
|
// annoyed at that.
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Wswitch-unreachable"
|
#pragma GCC diagnostic ignored "-Wswitch-unreachable"
|
||||||
|
#endif
|
||||||
|
|
||||||
// for protocols without strong CRCs we require 3 good frames to lock on
|
// for protocols without strong CRCs we require 3 good frames to lock on
|
||||||
bool requires_3_frames(enum rcprotocol_t p) {
|
bool requires_3_frames(enum rcprotocol_t p) {
|
||||||
@ -203,7 +205,9 @@ public:
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#if !defined(__clang__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
uint8_t num_channels();
|
uint8_t num_channels();
|
||||||
uint16_t read(uint8_t chan);
|
uint16_t read(uint8_t chan);
|
||||||
|
Loading…
Reference in New Issue
Block a user