Skip to content

Commit

Permalink
GCS_MAVLink: Remove pragma to disable compiler warning and instead ca…
Browse files Browse the repository at this point in the history
…st enum to int to fix the code.
  • Loading branch information
katzfey committed Dec 12, 2024
1 parent 72b420f commit 8f95caa
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions libraries/GCS_MAVLink/GCS_MAVLink.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f95caa

Please sign in to comment.