From 2e83541eba60aa31514c19ea36c8e94f7492de15 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:51:14 -0700 Subject: [PATCH] fix one build warning in MSVC (#21983) ### Description Fix one MSVC warning member not initialized ``` Warning C26495 Variable 'onnxruntime::ITuningContext::allocators_' is uninitialized. Always initialize a member variable (type.6). C:\code\onnxruntime\onnxruntime\core\framework\tuning_context.h 22 ``` --- onnxruntime/core/framework/tuning_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/framework/tuning_context.h b/onnxruntime/core/framework/tuning_context.h index aae70d8581..304fffa4ab 100644 --- a/onnxruntime/core/framework/tuning_context.h +++ b/onnxruntime/core/framework/tuning_context.h @@ -19,7 +19,7 @@ class TuningResultsValidator; class ITuningContext { public: - explicit ITuningContext(IExecutionProvider* ep) : ep_(ep) {} + explicit ITuningContext(IExecutionProvider* ep) : ep_(ep), allocators_(nullptr) {} virtual ~ITuningContext() = default; virtual void EnableTunableOp() = 0;