From 5d08f8811d291d35dadec9bc9803fc349bb0ae27 Mon Sep 17 00:00:00 2001 From: muramura Date: Sun, 6 Oct 2024 09:16:28 +0900 Subject: [PATCH] AP_Baro: To prevent incorrect warnings --- libraries/AP_Baro/AP_Baro_BMP388.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_Baro/AP_Baro_BMP388.cpp b/libraries/AP_Baro/AP_Baro_BMP388.cpp index 8cf39a5f36b34..c5254228eb263 100644 --- a/libraries/AP_Baro/AP_Baro_BMP388.cpp +++ b/libraries/AP_Baro/AP_Baro_BMP388.cpp @@ -129,7 +129,8 @@ bool AP_Baro_BMP388::init() } - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdangling-pointer" // accumulate a new sensor reading void AP_Baro_BMP388::timer(void) { @@ -150,6 +151,7 @@ void AP_Baro_BMP388::timer(void) dev->check_next_register(); } +#pragma GCC diagnostic pop // transfer data to the frontend void AP_Baro_BMP388::update(void)