Merge pull request #11478 from hugueskamba/hk-fix-some-more-warnings

Refactor CRC constructor method to remove warning
pull/11564/head
Martin Kojtal 2019-09-25 10:11:37 +02:00 committed by GitHub
commit ab857c4963
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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");
#if DEVICE_CRC
if (POLY_32BIT_REV_ANSI == polynomial) {
_crc_table = (uint32_t *)Table_CRC_32bit_Rev_ANSI;
_mode = TABLE;
return;
}
if (POLY_32BIT_REV_ANSI != polynomial) {
crc_mbed_config_t config;
config.polynomial = polynomial;
config.width = width;
@ -531,6 +527,7 @@ private:
_mode = HARDWARE;
return;
}
}
#endif
switch (polynomial) {