From 1154b6e57919d50b95d98ca34aa63496d26b10e5 Mon Sep 17 00:00:00 2001 From: Dwayne Robinson Date: Fri, 17 Jul 2020 08:04:05 +0000 Subject: [PATCH] Merged PR 4933520: (ap build) Update to GSL 3.1 - Fix signed unsigned cast warning Fix x86/arm32 build for signed unsigned cast warning. Related: https://microsoft.visualstudio.com/WindowsAI/_git/WindowsAI/pullrequest/4927342 --- .../core/providers/dml/OperatorAuthorHelper/OperatorHelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h index 0a845bb027..b06c81679e 100644 --- a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h +++ b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.h @@ -633,7 +633,7 @@ public: { int dimIndex = axes.empty() ? i : axes[i]; int stride = steps.empty() ? 1 : steps[i]; - ML_CHECK_VALID_ARGUMENT(dimIndex < inputDimensions.size(), "'axes' must be valid with within actual input dimensions."); + ML_CHECK_VALID_ARGUMENT(static_cast(dimIndex) < static_cast(inputDimensions.size()), "'axes' must be valid with within actual input dimensions."); ML_CHECK_VALID_ARGUMENT(stride != 0, "'steps' must not be 0."); // Positive values are offsets from 0.