Skip to content

Commit

Permalink
Clean up unused upper_string function
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nickbp authored Dec 1, 2019
1 parent 613852a commit 1d1a277
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions libairspyhf/src/airspyhf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1d1a277

Please sign in to comment.