From 4e995437eb9c0decd1bbd2cdfbf7f244ecdf68f6 Mon Sep 17 00:00:00 2001 From: yf711 Date: Mon, 17 Jun 2024 12:15:15 -0700 Subject: [PATCH] Revert "remove 4996 in nv_includes.h & test_main.cc" This reverts commit facd228666104a6fb2123f519eb341ce57b5169a. --- onnxruntime/core/providers/tensorrt/nv_includes.h | 9 ++++----- onnxruntime/test/unittest_main/test_main.cc | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/onnxruntime/core/providers/tensorrt/nv_includes.h b/onnxruntime/core/providers/tensorrt/nv_includes.h index 8b3f4696f5e5a..047f325f49b70 100644 --- a/onnxruntime/core/providers/tensorrt/nv_includes.h +++ b/onnxruntime/core/providers/tensorrt/nv_includes.h @@ -2,12 +2,11 @@ // Licensed under the MIT License. #pragma once -// File to include the required TRT headers with workarounds for warnings we can't fix. - -// Ignore warning C4100: unreferenced formal parameter +// File to include the required TRT headers with workarounds for warnings we can't fix or not fixed yet. #if defined(_MSC_VER) #pragma warning(push) -#pragma warning(disable : 4100) +#pragma warning(disable : 4100) // Ignore warning C4100: unreferenced formal parameter +#pragma warning(disable : 4996) // Ignore warning C4996: 'nvinfer1::IPluginV2' was declared deprecated #endif #include @@ -17,4 +16,4 @@ #if defined(_MSC_VER) #pragma warning(pop) -#endif \ No newline at end of file +#endif diff --git a/onnxruntime/test/unittest_main/test_main.cc b/onnxruntime/test/unittest_main/test_main.cc index d7e8bf9063645..b7c3b38538421 100644 --- a/onnxruntime/test/unittest_main/test_main.cc +++ b/onnxruntime/test/unittest_main/test_main.cc @@ -36,6 +36,7 @@ void ortenv_setup() { #if defined(_MSC_VER) #pragma warning(push) #pragma warning(disable : 4100) // Ignore warning C4100: unreferenced format parameter. +#pragma warning(disable : 4996) // Ignore warning C4996: 'nvinfer1::IPluginV2' was declared deprecated #endif // TensorRT will load/unload libraries as builder objects are created and torn down. This will happen for