Remove MSVC C4702 suppressions in code
We've since suppressed it project-wide because the warning is a bit too
aggressive.
Change-Id: I66b5de66e608a891123dece31fcca3300e0868db
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/77907
Commit-Queue: Adam Langley <agl@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/evp/evp_test.cc b/crypto/evp/evp_test.cc
index 70f6c76..f71bd9f 100644
--- a/crypto/evp/evp_test.cc
+++ b/crypto/evp/evp_test.cc
@@ -19,16 +19,11 @@
#include <stdlib.h>
#include <string.h>
-OPENSSL_MSVC_PRAGMA(warning(push))
-OPENSSL_MSVC_PRAGMA(warning(disable: 4702))
-
#include <map>
#include <string>
#include <utility>
#include <vector>
-OPENSSL_MSVC_PRAGMA(warning(pop))
-
#include <gtest/gtest.h>
#include <openssl/bn.h>
diff --git a/crypto/fipsmodule/cipher/e_aes.cc.inc b/crypto/fipsmodule/cipher/e_aes.cc.inc
index 3ee6c7b..d2fc225 100644
--- a/crypto/fipsmodule/cipher/e_aes.cc.inc
+++ b/crypto/fipsmodule/cipher/e_aes.cc.inc
@@ -31,9 +31,6 @@
#include "internal.h"
-OPENSSL_MSVC_PRAGMA(warning(push))
-OPENSSL_MSVC_PRAGMA(warning(disable : 4702)) // Unreachable code.
-
#define AES_GCM_NONCE_LENGTH 12
typedef struct {
@@ -1238,5 +1235,3 @@
return 0;
#endif
}
-
-OPENSSL_MSVC_PRAGMA(warning(pop))
diff --git a/crypto/test/file_test.h b/crypto/test/file_test.h
index b35056f..4cd22db 100644
--- a/crypto/test/file_test.h
+++ b/crypto/test/file_test.h
@@ -19,9 +19,6 @@
#include <stdint.h>
-OPENSSL_MSVC_PRAGMA(warning(push))
-OPENSSL_MSVC_PRAGMA(warning(disable : 4702))
-
#include <functional>
#include <map>
#include <memory>
@@ -29,8 +26,6 @@
#include <string>
#include <vector>
-OPENSSL_MSVC_PRAGMA(warning(pop))
-
// File-based test framework.
//
// This module provides a file-based test framework. The file format is based on
diff --git a/tool/internal.h b/tool/internal.h
index 2c02a74..739b518 100644
--- a/tool/internal.h
+++ b/tool/internal.h
@@ -18,18 +18,11 @@
#include <openssl/base.h>
#include <openssl/span.h>
+#include <map>
#include <string>
#include <utility>
#include <vector>
-// MSVC issues warning C4702 for unreachable code in its xtree header when
-// compiling with -D_HAS_EXCEPTIONS=0. See
-// https://connect.microsoft.com/VisualStudio/feedback/details/809962
-OPENSSL_MSVC_PRAGMA(warning(push))
-OPENSSL_MSVC_PRAGMA(warning(disable: 4702))
-#include <map>
-OPENSSL_MSVC_PRAGMA(warning(pop))
-
struct FileCloser {
void operator()(FILE *file) {
fclose(file);