From c0deee23a3cc0146d3a1cafb55ec47bc51dd89bb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Thu, 15 Feb 2024 11:40:30 +1100 Subject: [PATCH] AP_TemperatureSensor: correct compilation when GCS not available This variable becomes unused --- libraries/AP_TemperatureSensor/AP_TemperatureSensor_TSYS03.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_TSYS03.cpp b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_TSYS03.cpp index 649a0063a31b0..eb14de06a7757 100644 --- a/libraries/AP_TemperatureSensor/AP_TemperatureSensor_TSYS03.cpp +++ b/libraries/AP_TemperatureSensor/AP_TemperatureSensor_TSYS03.cpp @@ -36,6 +36,7 @@ static const uint8_t TSYS03_CMD_READ_ADC = 0x00; void AP_TemperatureSensor_TSYS03::init() { constexpr char name[] = "TSYS03"; + (void)name; // sometimes this is unused (e.g. HAL_GCS_ENABLED false) #if AP_TEMPERATURE_SENSOR_TSYS03_ENFORCE_KNOWN_VALID_I2C_ADDRESS // I2C Address: Default to using TSYS03_ADDR_CSB0 & Check I2C Address is Correct