summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDuMaM <[email protected]>2021-06-26 17:03:46 +0200
committerGitHub <[email protected]>2021-06-26 17:03:46 +0200
commitb5ce269675c4d220806126cc76f8c57406da27d2 (patch)
tree489b7e2dafa298b57f02bcf2291be2887dcc6725 /src
parent5a4fc1151a7e62a291a90836165942737a1a2d6f (diff)
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); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ ```
Diffstat (limited to 'src')
-rw-r--r--src/portable/nordic/nrf5x/dcd_nrf5x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c
index b3b2dec2d..5f4fe08ad 100644
--- a/src/portable/nordic/nrf5x/dcd_nrf5x.c
+++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c
@@ -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);
}