Need enable compiler warning for missing default case by default.
Related fix: #568 #567 #564
We should enable such warning treat as error by default, and catch them in CI in the future.
This can be achieved by enabling -Wswitch and -Wswitch-default but applying this is a bit more tricky than I expected. Currently the compile configurations are set at the main CMakeLists.txt and passed down to the crypto library's compilation step. This results in compiling the crypto library with this warning enabled as well which at least in the case of mbedtls results in errors.
We might have to decouple compiling of the crypto libraries and their build configuration from the compilation of libspdm itself and just define a dependency on a crypto library from libspdm's configuration.
Agree. Crypto lib such as openssl, mbedtls can be handled later. The primary work to enforce the policy to libspdm libraries.