From fdf7285d202ca3e28eb5d6a637df85bb07e1b35e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Thu, 5 Dec 2024 09:57:59 +0100 Subject: [PATCH] Correcting build warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this statement may fall through [-Werror=implicit-fallthrough=] enumeration value ‘Unknown’ not handled in switch [-Werror=switch] Signed-off-by: Björn Svensson --- src/lib/SoftHSM.cpp | 1 + src/lib/crypto/OSSLCryptoFactory.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/lib/SoftHSM.cpp b/src/lib/SoftHSM.cpp index 54f9089f..b155ef19 100644 --- a/src/lib/SoftHSM.cpp +++ b/src/lib/SoftHSM.cpp @@ -1160,6 +1160,7 @@ CK_RV SoftHSM::C_GetMechanismInfo(CK_SLOT_ID slotID, CK_MECHANISM_TYPE type, CK_ /* FALLTHROUGH */ case CKM_AES_CBC: pInfo->flags |= CKF_WRAP; + /* FALLTHROUGH */ case CKM_AES_ECB: case CKM_AES_CTR: case CKM_AES_GCM: diff --git a/src/lib/crypto/OSSLCryptoFactory.cpp b/src/lib/crypto/OSSLCryptoFactory.cpp index 32f8dc86..60cd3216 100644 --- a/src/lib/crypto/OSSLCryptoFactory.cpp +++ b/src/lib/crypto/OSSLCryptoFactory.cpp @@ -310,6 +310,8 @@ SymmetricAlgorithm* OSSLCryptoFactory::getSymmetricAlgorithm(SymAlgo::Type algor case SymAlgo::DES: case SymAlgo::DES3: return new OSSLDES(); + default: + break; } // No algorithm implementation is available @@ -342,6 +344,8 @@ AsymmetricAlgorithm* OSSLCryptoFactory::getAsymmetricAlgorithm(AsymAlgo::Type al case AsymAlgo::EDDSA: return new OSSLEDDSA(); #endif + default: + break; } // No algorithm implementation is available @@ -370,6 +374,8 @@ HashAlgorithm* OSSLCryptoFactory::getHashAlgorithm(HashAlgo::Type algorithm) case HashAlgo::GOST: return new OSSLGOSTR3411(); #endif + default: + break; } // No algorithm implementation is available @@ -402,6 +408,8 @@ MacAlgorithm* OSSLCryptoFactory::getMacAlgorithm(MacAlgo::Type algorithm) return new OSSLCMACDES(); case MacAlgo::CMAC_AES: return new OSSLCMACAES(); + default: + break; } // No algorithm implementation is available