Skip to content

Commit 6fcd297

Browse files
authored
Merge pull request #11470 from hugueskamba/hk-fix-warnings
Prevent unreachable statements and correct variable sizes.
2 parents e134b22 + 2163d07 commit 6fcd297

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

drivers/USBAudio.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ class USBAudio: protected USBDevice {
373373
usb_ep_t _episo_in; // tx endpoint
374374

375375
// channel config in the configuration descriptor: master, left, right
376-
uint8_t _channel_config_rx;
377-
uint8_t _channel_config_tx;
376+
uint16_t _channel_config_rx;
377+
uint16_t _channel_config_tx;
378378

379379
// configuration descriptor
380380
uint8_t _config_descriptor[183];

rtos/source/Semaphore.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,9 @@ osStatus Semaphore::release(void)
212212
return osErrorResource;
213213
}
214214
} while (!core_util_atomic_cas_s32(&_count, &old_count, old_count + 1));
215-
#endif
215+
216216
return osOK;
217+
#endif // MBED_CONF_RTOS_PRESENT
217218
}
218219

219220
Semaphore::~Semaphore()

rtos/source/TARGET_CORTEX/mbed_rtos_rtx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,4 @@ MBED_NORETURN void mbed_rtos_start()
115115

116116
osKernelStart();
117117
MBED_ERROR(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_INITIALIZATION_FAILED), "Failed to start RTOS");
118-
while (1); // Code should never get here
119118
}

rtos/source/TARGET_CORTEX/mbed_rtx_handlers.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ __NO_RETURN uint32_t osRtxErrorNotify(uint32_t code, void *object_id)
8080
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_KERNEL, MBED_ERROR_CODE_UNKNOWN), "CMSIS-RTOS error: Unknown", code);
8181
break;
8282
}
83-
84-
/* That shouldn't be reached */
85-
for (;;) {}
8683
}
8784

8885
#if defined(MBED_TRAP_ERRORS_ENABLED) && MBED_TRAP_ERRORS_ENABLED

0 commit comments

Comments
 (0)