提交 7b80885c 编写于 作者: M Mark VanderVoord 提交者: GitHub

Merge pull request #272 from FSMaxB/gcc43-wconversion

Fix -Wconversion with gcc-4.3
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册