libstrat: enable -Wextra, -Werror

This caught an embarrassingly large number of bugs.
This commit is contained in:
Michael Scire
2021-10-06 15:20:48 -07:00
parent e1fbf27398
commit 7ca83c9d3b
160 changed files with 691 additions and 152 deletions

View File

@@ -36,6 +36,7 @@ namespace ams::crypto::impl {
void AesImpl<KeySize>::Initialize(const void *key, size_t key_size, bool is_encrypt) {
static_assert(IsSupportedKeySize(KeySize));
AMS_ASSERT(key_size == KeySize);
AMS_UNUSED(key_size);
if constexpr (KeySize == 16) {
/* Aes 128. */
@@ -60,6 +61,7 @@ namespace ams::crypto::impl {
static_assert(IsSupportedKeySize(KeySize));
AMS_ASSERT(src_size >= BlockSize);
AMS_ASSERT(dst_size >= BlockSize);
AMS_UNUSED(src_size, dst_size);
if constexpr (KeySize == 16) {
/* Aes 128. */
@@ -84,6 +86,7 @@ namespace ams::crypto::impl {
static_assert(IsSupportedKeySize(KeySize));
AMS_ASSERT(src_size >= BlockSize);
AMS_ASSERT(dst_size >= BlockSize);
AMS_UNUSED(src_size, dst_size);
if constexpr (KeySize == 16) {
/* Aes 128. */