From a79d88ed7f856836a7ff3d35e4277489c4bbdd2e Mon Sep 17 00:00:00 2001 From: Chen Fu <1316708+chenfucn@users.noreply.github.com> Date: Wed, 28 Dec 2022 10:38:36 -0800 Subject: [PATCH] Fix prefast scan bug 8995 (#14077) ### Description Prefast warning fix ### Motivation and Context https://dev.azure.com/aiinfra/ONNX%20Runtime/_workitems/edit/8995/ Co-authored-by: Chen Fu --- onnxruntime/test/optimizer/avx2_weight_s8_to_u8_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/onnxruntime/test/optimizer/avx2_weight_s8_to_u8_test.cc b/onnxruntime/test/optimizer/avx2_weight_s8_to_u8_test.cc index a12e0e6522..3bb0220d26 100644 --- a/onnxruntime/test/optimizer/avx2_weight_s8_to_u8_test.cc +++ b/onnxruntime/test/optimizer/avx2_weight_s8_to_u8_test.cc @@ -81,6 +81,10 @@ void BuildMatMulIntegerToFloatGraph(ModelTestBuilder& helper, helper.SetGraphOutputs(); } +#ifdef _MSC_VER +#pragma warning(push) +#pragma warning(disable : 6262) +#endif TEST(CPU_U8S8_Precision_Tests, MatMulIntegerToFloat) { std::unordered_map domain_to_version; domain_to_version[kOnnxDomain] = 12; @@ -169,6 +173,9 @@ TEST(CPU_U8S8_Precision_Tests, MatMulIntegerToFloat) { EXPECT_EQ(ret.first, COMPARE_RESULT::SUCCESS) << ret.second; } } +#ifdef _MSC_VER +#pragma warning(pop) +#endif template void BuildDynamicQuantizeMatMulGraph(