diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.h b/libraries/GCS_MAVLink/GCS_MAVLink.h index b59ba9d93c..7a7db6a683 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.h +++ b/libraries/GCS_MAVLink/GCS_MAVLink.h @@ -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(chan) < MAVLINK_COMM_NUM_BUFFERS; } mavlink_message_t* mavlink_get_channel_buffer(uint8_t chan);