From cf6dc5d38385e4ff6faf9bf0883a67c2f511076b Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Fri, 20 Dec 2024 17:33:26 -0500 Subject: [PATCH] Disable MSVC's C4702 warning It flags aes_ctr_set_key as having unreachable code in no-asm builds. It is true that there is unreachable code in there, but I'm unclear on why just that function is being flagged. Since we often will no-op our platform codepaths to avoid ifdefs in build configurations that don't want them, such a sensitive warning is not useful. Just turn it off. Fixed: 385161043 Change-Id: I5ed066d6d1d95dcc57a1cac01fad553e9ef4db7d Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/74607 Reviewed-by: Adam Langley Commit-Queue: David Benjamin Commit-Queue: Adam Langley Auto-Submit: David Benjamin --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d96aad5b..63efa91a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,6 +188,8 @@ elseif(MSVC) "C4244" # 'function' : conversion from 'int' to 'uint8_t', # possible loss of data "C4267" # conversion from 'size_t' to 'int', possible loss of data + "C4702" # unreachable code; MSVC's warning is too aggressive. See + # https://crbug.com/385161043 "C4706" # assignment within conditional expression ) string(REPLACE "C" " -wd" MSVC_DISABLED_WARNINGS_STR