소스 검색

unity: make it work with -Wconversion

Max Bruckner 8 년 전
부모
커밋
12acc57967
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tests/unity/src/unity.c

+ 1 - 1
tests/unity/src/unity.c

@@ -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));