From 1c556d2e4cd7258f302b752e845bd81cac11112f Mon Sep 17 00:00:00 2001 From: Max Bruckner Date: Sat, 18 Mar 2017 17:42:02 +0100 Subject: [PATCH] Fix -Wconversion with gcc-4.3 --- src/unity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/unity.c b/src/unity.c index 5266364..2642efa 100644 --- a/src/unity.c +++ b/src/unity.c @@ -898,16 +898,16 @@ void UnityAssertNumbersWithin(const UNITY_UINT delta, if ((style & UNITY_DISPLAY_RANGE_INT) == UNITY_DISPLAY_RANGE_INT) { if (actual > expected) - Unity.CurrentTestFailed = ((UNITY_UINT)(actual - expected) > delta); + Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta); else - Unity.CurrentTestFailed = ((UNITY_UINT)(expected - actual) > delta); + Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta); } else { if ((UNITY_UINT)actual > (UNITY_UINT)expected) - Unity.CurrentTestFailed = ((UNITY_UINT)(actual - expected) > delta); + Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(actual - expected) > delta); else - Unity.CurrentTestFailed = ((UNITY_UINT)(expected - actual) > delta); + Unity.CurrentTestFailed = (UNITY_UINT)((UNITY_UINT)(expected - actual) > delta); } if (Unity.CurrentTestFailed)