From e8cdeeda92343390e0a6f73118df0a808b78f2df Mon Sep 17 00:00:00 2001 From: Robin Getz Date: Mon, 26 Oct 2026 17:17:50 -0400 Subject: [PATCH] devices/limesdr: Use correct format specifier for channel index Use %zu to print size_t channel indices in error messages. The previous %lu specifier expects unsigned long, which is not guaranteed to match size_t on all platforms. Identified by cppcheck format warnings. Signed-off-by: Robin Getz --- devices/limesdr/devicelimesdr.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/devices/limesdr/devicelimesdr.cpp b/devices/limesdr/devicelimesdr.cpp index a2efec0e4..4eeec1bf9 100644 --- a/devices/limesdr/devicelimesdr.cpp +++ b/devices/limesdr/devicelimesdr.cpp @@ -167,7 +167,7 @@ bool DeviceLimeSDR::SetRFELNA_dB(lms_device_t *device, std::size_t chan, int val { if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0) { - fprintf(stderr, "DeviceLimeSDR::SetRFELNA_dB: cannot set channel to #%lu\n", chan); + fprintf(stderr, "DeviceLimeSDR::SetRFELNA_dB: cannot set channel to #%zu\n", chan); return false; } @@ -207,7 +207,7 @@ bool DeviceLimeSDR::SetRFETIA_dB(lms_device_t *device, std::size_t chan, int val { if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0) { - fprintf(stderr, "DeviceLimeSDR::SetRFETIA_dB: cannot set channel to #%lu\n", chan); + fprintf(stderr, "DeviceLimeSDR::SetRFETIA_dB: cannot set channel to #%zu\n", chan); return false; } @@ -232,7 +232,7 @@ bool DeviceLimeSDR::SetRBBPGA_dB(lms_device_t *device, std::size_t chan, float v { if (LMS_WriteParam(device, LMS7param(MAC), chan+1) < 0) { - fprintf(stderr, "DeviceLimeSDR::SetRBBPGA_dB: cannot set channel to #%lu\n", chan); + fprintf(stderr, "DeviceLimeSDR::SetRBBPGA_dB: cannot set channel to #%zu\n", chan); return false; }