mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: Remove pragma to disable compiler warning and instead cast enum to int to fix the code.
This commit is contained in:
parent
93ba994eb1
commit
7c1cc26509
|
@ -55,10 +55,7 @@ extern mavlink_system_t mavlink_system;
|
|||
/// @param chan Channel to send to
|
||||
static inline bool valid_channel(mavlink_channel_t chan)
|
||||
{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
||||
return chan < MAVLINK_COMM_NUM_BUFFERS;
|
||||
#pragma clang diagnostic pop
|
||||
return static_cast<int>(chan) < MAVLINK_COMM_NUM_BUFFERS;
|
||||
}
|
||||
|
||||
mavlink_message_t* mavlink_get_channel_buffer(uint8_t chan);
|
||||
|
|
Loading…
Reference in New Issue