Remove `statement is unreachable` warning in MbedCRC.h

The code removed appears unnecessary given that the switch case below
also handles the case where the polynomial is `POLY_32BIT_REV_ANSI`
pull/11478/head
Hugues Kamba 2019-09-12 15:57:32 +01:00
parent 01bb1b94d7
commit 5bfb5bf269
1 changed files with 12 additions and 15 deletions

View File

@ -514,11 +514,7 @@ private:
MBED_STATIC_ASSERT(width <= 32, "Max 32-bit CRC supported"); MBED_STATIC_ASSERT(width <= 32, "Max 32-bit CRC supported");
#if DEVICE_CRC #if DEVICE_CRC
if (POLY_32BIT_REV_ANSI == polynomial) { if (POLY_32BIT_REV_ANSI != polynomial) {
_crc_table = (uint32_t *)Table_CRC_32bit_Rev_ANSI;
_mode = TABLE;
return;
}
crc_mbed_config_t config; crc_mbed_config_t config;
config.polynomial = polynomial; config.polynomial = polynomial;
config.width = width; config.width = width;
@ -531,6 +527,7 @@ private:
_mode = HARDWARE; _mode = HARDWARE;
return; return;
} }
}
#endif #endif
switch (polynomial) { switch (polynomial) {