GCC 11 build fix

During Adafruit Bootloader compilation, I spotted bellow error which do not allow me build project.

``` c
    inlined from 'hfclk_running' at lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:785:13:
lib/tinyusb/src/portable/nordic/nrf5x/dcd_nrf5x.c:792:31: error: 'is_running' may be used uninitialized [-Werror=maybe-uninitialized]
  792 |     return (is_running ? true : false);
      |            ~~~~~~~~~~~~~~~~~~~^~~~~~~~
```
This commit is contained in:
DuMaM 2021-06-26 17:03:46 +02:00 committed by GitHub
parent 5a4fc1151a
commit b5ce269675
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -787,7 +787,7 @@ static bool hfclk_running(void)
#ifdef SOFTDEVICE_PRESENT
if ( is_sd_enabled() )
{
uint32_t is_running;
uint32_t is_running = 0;
(void) sd_clock_hfclk_is_running(&is_running);
return (is_running ? true : false);
}