1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 03:20:00 +03:00

Added missing GCC diagnostic push pragma (#14397)

Replaced faulty #pragma GCC diagnostic ignored "-Wunused-function" with the more elegant MAYBE_UNUSED macro
This commit is contained in:
Eric Katzfey 2025-05-21 06:53:43 -07:00 committed by GitHub
parent 51c8296f25
commit b03b57bd90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -343,16 +343,13 @@ static void mspFcSetPassthroughCommand(sbuf_t *dst, sbuf_t *src, mspPostProcessF
} }
} }
// TODO: Remove the pragma once this is called from unconditional code MAYBE_UNUSED static void configRebootUpdateCheckU8(uint8_t *parm, uint8_t value)
#pragma GCC diagnostic ignored "-Wunused-function"
static void configRebootUpdateCheckU8(uint8_t *parm, uint8_t value)
{ {
if (*parm != value) { if (*parm != value) {
setRebootRequired(); setRebootRequired();
} }
*parm = value; *parm = value;
} }
#pragma GCC diagnostic pop
static void mspRebootFn(serialPort_t *serialPort) static void mspRebootFn(serialPort_t *serialPort)
{ {