From 6b00e6bb4df23e77da73b72c67ff98ba605712f1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 28 Nov 2018 11:30:57 -0800 Subject: [PATCH] Simpler unused parameter in #if defined() switch. --- onnxruntime/core/providers/cpu/math/softmax_shared.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/onnxruntime/core/providers/cpu/math/softmax_shared.cc b/onnxruntime/core/providers/cpu/math/softmax_shared.cc index 77f6cf69a0..18f077d6c1 100644 --- a/onnxruntime/core/providers/cpu/math/softmax_shared.cc +++ b/onnxruntime/core/providers/cpu/math/softmax_shared.cc @@ -40,12 +40,6 @@ #include #endif -#ifdef __GNUC__ -#define UNUSED __attribute__((unused)) -#else -#define UNUSED -#endif - namespace onnxruntime { common::Status SoftmaxCore(const int n, @@ -65,7 +59,7 @@ common::Status SoftmaxCore(const int n, return Status::OK(); } -static int GetParallelGroupCount(int UNUSED n, int UNUSED d) { +static int GetParallelGroupCount(int n, int d) { #if defined(_OPENMP) int omp_num_threads = omp_get_num_threads(); int group_count = std::min(omp_num_threads, n); @@ -77,6 +71,8 @@ static int GetParallelGroupCount(int UNUSED n, int UNUSED d) { return std::min(group_count, max_groups); #else + (void)n; + (void)d; return 1; #endif }