From 3bead4f88ae875b2d59f565d58a23cf0383f681a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 19 Feb 2023 09:36:00 +1100 Subject: [PATCH] AP_RCTelemetry: fixed warning with gcc 12.2 --- libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp b/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp index a1b6b93bc7..991be4d059 100644 --- a/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp +++ b/libraries/AP_RCTelemetry/AP_CRSF_Telem.cpp @@ -831,6 +831,10 @@ void AP_CRSF_Telem::update_vtx_params() } _telem_pending = true; // calculate command crc +#pragma GCC diagnostic push +#if defined(__GNUC__) && __GNUC__ >= 10 +#pragma GCC diagnostic ignored "-Wstringop-overflow" +#endif uint8_t* crcptr = &_telem.ext.command.destination; uint8_t crc = crc8_dvb(0, AP_RCProtocol_CRSF::CRSF_FRAMETYPE_COMMAND, 0xBA); for (uint8_t i = 0; i < len; i++) { @@ -838,6 +842,7 @@ void AP_CRSF_Telem::update_vtx_params() } crcptr[len] = crc; _telem_size = len + 1; +#pragma GCC diagnostic pop } } #endif // AP_VIDEOTX_ENABLED