提交 7bce0b4f 编写于 作者: M Max Bruckner

Fix warning with ubsan and -Wconversion

This fixes a compiler warning about a lossy conversion from long
unsigned int to int when compiling unity with gcc 6.3.1 and
the options -std=c89 -Wconversion -fsanitize=undefined
上级 b5da224f
......@@ -194,7 +194,7 @@ void UnityPrintNumberHex(const UNITY_UINT number, const char nibbles_to_print)
while (nibbles > 0)
{
nibbles--;
nibble = (number >> (nibbles * 4)) & 0x0F;
nibble = (int)(number >> (nibbles * 4)) & 0x0F;
if (nibble <= 9)
{
UNITY_OUTPUT_CHAR((char)('0' + nibble));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册