From f8f12138415ecc42653563655eb19245a6b0e08a Mon Sep 17 00:00:00 2001 From: Jukka Laitinen Date: Tue, 23 Aug 2022 17:25:19 +0400 Subject: [PATCH] board_adc: Small fix for printf formatter Print sizeof type with %zu to be compatible with 64 bit targets, where it is unsigned long Signed-off-by: Jukka Laitinen --- src/drivers/adc/board_adc/ADC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/adc/board_adc/ADC.cpp b/src/drivers/adc/board_adc/ADC.cpp index 7c2b822bd6..d69d085c01 100644 --- a/src/drivers/adc/board_adc/ADC.cpp +++ b/src/drivers/adc/board_adc/ADC.cpp @@ -56,7 +56,7 @@ ADC::ADC(uint32_t base_address, uint32_t channels, bool publish_adc_report) : } if (_channel_count > PX4_MAX_ADC_CHANNELS) { - PX4_ERR("PX4_MAX_ADC_CHANNELS is too small (%u, %u)", PX4_MAX_ADC_CHANNELS, _channel_count); + PX4_ERR("PX4_MAX_ADC_CHANNELS is too small (%zu, %u)", PX4_MAX_ADC_CHANNELS, _channel_count); } _samples = new px4_adc_msg_t[_channel_count];