From 4d91071e7e514d244968fc98ff39a492c7b52592 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Sat, 12 Dec 2020 01:11:55 -0800 Subject: [PATCH] AP_Periph: ignore unused-function error for helper fix_float16() --- Tools/AP_Periph/can.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tools/AP_Periph/can.cpp b/Tools/AP_Periph/can.cpp index 7cf40083f0..57f97576a9 100644 --- a/Tools/AP_Periph/can.cpp +++ b/Tools/AP_Periph/can.cpp @@ -451,10 +451,13 @@ static void handle_allocation_response(CanardInstance* ins, CanardRxTransfer* tr /* fix value of a float for canard float16 format */ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-function" static void fix_float16(float &f) { *(uint16_t *)&f = canardConvertNativeFloatToFloat16(f); } +#pragma GCC diagnostic pop #ifdef HAL_PERIPH_ENABLE_BUZZER