Address switch enum warning with newer clang versions.

This commit is contained in:
Benbuck Nason 2018-10-06 01:12:28 -07:00
parent 7fe6e5fb9a
commit f18b00992b
2 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,7 @@ if (ENABLE_CUSTOM_COMPILER_FLAGS)
-Werror
-Wno-float-equal
-Wno-padded
-Wno-covered-switch-default
)
elseif ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
list(APPEND custom_compiler_flags

View File

@ -803,6 +803,7 @@ void UnityAssertFloatSpecial(const UNITY_FLOAT actual,
is_trait = !isinf(actual) && !isnan(actual);
break;
case UNITY_FLOAT_INVALID_TRAIT:
default:
trait_index = 0;
trait_names[0] = UnityStrInvalidFloatTrait;
@ -933,6 +934,7 @@ void UnityAssertDoubleSpecial(const UNITY_DOUBLE actual,
is_trait = !isinf(actual) && !isnan(actual);
break;
case UNITY_FLOAT_INVALID_TRAIT:
default:
trait_index = 0;
trait_names[0] = UnityStrInvalidFloatTrait;