Skip to content

Commit

Permalink
Correcting build warnings
Browse files Browse the repository at this point in the history
this statement may fall through [-Werror=implicit-fallthrough=]
enumeration value ‘Unknown’ not handled in switch [-Werror=switch]

Signed-off-by: Björn Svensson <[email protected]>
  • Loading branch information
bjosv committed Dec 5, 2024
1 parent bcf0331 commit fdf7285
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/SoftHSM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions src/lib/crypto/OSSLCryptoFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -342,6 +344,8 @@ AsymmetricAlgorithm* OSSLCryptoFactory::getAsymmetricAlgorithm(AsymAlgo::Type al
case AsymAlgo::EDDSA:
return new OSSLEDDSA();
#endif
default:
break;
}

// No algorithm implementation is available
Expand Down Expand Up @@ -370,6 +374,8 @@ HashAlgorithm* OSSLCryptoFactory::getHashAlgorithm(HashAlgo::Type algorithm)
case HashAlgo::GOST:
return new OSSLGOSTR3411();
#endif
default:
break;
}

// No algorithm implementation is available
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fdf7285

Please sign in to comment.