From 16b4ac222e6102fcaeec28fafea883d85012a664 Mon Sep 17 00:00:00 2001 From: Daniel Lehman Date: Mon, 3 Apr 2017 14:08:28 -0700 Subject: [PATCH] msvcrt: Fix build warnings ../../../dlls/msvcr110/../msvcrt/scheduler.c: In function 'SchedulerPolicy_SetPolicyValue': ../../../dlls/msvcr110/../msvcrt/scheduler.c:474:5: warning: comparison of unsigned expression < 0 is always false ../../../dlls/msvcr110/../msvcrt/scheduler.c: In function 'SchedulerPolicy_GetPolicyValue': ../../../dlls/msvcr110/../msvcrt/scheduler.c:534:5: warning: comparison of unsigned expression < 0 is always false ../../../dlls/msvcr100/../msvcrt/scheduler.c: In function 'SchedulerPolicy_SetPolicyValue': ../../../dlls/msvcr100/../msvcrt/scheduler.c:474:5: warning: comparison of unsigned expression < 0 is always false ../../../dlls/msvcr100/../msvcrt/scheduler.c: In function 'SchedulerPolicy_GetPolicyValue': ../../../dlls/msvcr100/../msvcrt/scheduler.c:534:5: warning: comparison of unsigned expression < 0 is always false ../../../dlls/msvcr120/../msvcrt/scheduler.c: In function 'SchedulerPolicy_SetPolicyValue': ../../../dlls/msvcr120/../msvcrt/scheduler.c:474:5: warning: comparison of unsigned expression < 0 is always false ../../../dlls/msvcr120/../msvcrt/scheduler.c: In function 'SchedulerPolicy_GetPolicyValue': ../../../dlls/msvcr120/../msvcrt/scheduler.c:534:5: warning: comparison of unsigned expression < 0 is always false Signed-off-by: Daniel Lehman --- dlls/msvcrt/scheduler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 4f07bb3..a02d99d 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -471,7 +471,7 @@ unsigned int __thiscall SchedulerPolicy_SetPolicyValue(SchedulerPolicy *this, throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "MinConcurrency"); if (policy == MaxConcurrency) throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "MaxConcurrency"); - if (policy < SchedulerKind || policy >= last_policy_id) + if (policy >= last_policy_id) throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "Invalid policy"); switch(policy) { @@ -531,7 +531,7 @@ unsigned int __thiscall SchedulerPolicy_GetPolicyValue( { TRACE("(%p %d)\n", this, policy); - if (policy < SchedulerKind || policy >= last_policy_id) + if (policy >= last_policy_id) throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "Invalid policy"); return this->policy_container->policies[policy]; } -- 1.9.5