From 78bc53f91dbf6bb72d79441231879656c6847734 Mon Sep 17 00:00:00 2001 From: Yulong Wang <7679871+fs-eire@users.noreply.github.com> Date: Tue, 13 Sep 2022 15:22:55 -0700 Subject: [PATCH] fix prefast:Warning C26814 in non_max_suppression.cc (#12934) --- .../core/providers/cuda/object_detection/non_max_suppression.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/cuda/object_detection/non_max_suppression.cc b/onnxruntime/core/providers/cuda/object_detection/non_max_suppression.cc index 9af4f8d15b..316b955496 100644 --- a/onnxruntime/core/providers/cuda/object_detection/non_max_suppression.cc +++ b/onnxruntime/core/providers/cuda/object_detection/non_max_suppression.cc @@ -88,7 +88,7 @@ Status NonMaxSuppression::ComputeInternal(OpKernelContext* ctx) const { ctx->Output(0, {0, 3}); } else { // concatenate outputs - const int last_dim = 3; + constexpr int last_dim = 3; const int num_elements = last_dim * total_num_saved_outputs; Tensor* output = ctx->Output(0, {static_cast(total_num_saved_outputs), last_dim}); ORT_ENFORCE(output != nullptr);