From 1d1a2779356aae85762147e726f409cf4d9bf820 Mon Sep 17 00:00:00 2001 From: Nicholas Parker Date: Mon, 2 Dec 2019 08:20:02 +1300 Subject: [PATCH] Clean up unused upper_string function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shows up as a warning at compile time: ``` libairspyhf/src/airspyhf.c:549:13: warning: ‘upper_string’ defined but not used [-Wunused-function] 549 | static void upper_string(unsigned char *string, size_t len) | ^~~~~~~~~~~~ ``` Observed on g++ 9.2.0. After removing the unused function the code compiled without the warning. --- libairspyhf/src/airspyhf.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/libairspyhf/src/airspyhf.c b/libairspyhf/src/airspyhf.c index 6e27495..08f8bfb 100644 --- a/libairspyhf/src/airspyhf.c +++ b/libairspyhf/src/airspyhf.c @@ -546,19 +546,6 @@ static void airspyhf_open_exit(airspyhf_device_t* device) device->usb_context = NULL; } -static void upper_string(unsigned char *string, size_t len) -{ - while (len > 0) - { - if (*string >= 'a' && *string <= 'z') - { - *string = *string - 32; - } - string++; - len--; - } -} - static int airspyhf_read_samplerates_from_fw(airspyhf_device_t* device, uint32_t* buffer, const uint32_t len) { int result;