Przeglądaj źródła

unity: make it work with -Wconversion

Max Bruckner 8 lat temu
rodzic
commit
12acc57967
1 zmienionych plików z 1 dodań i 1 usunięć
  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)
     while (nibbles > 0)
     {
     {
         nibbles--;
         nibbles--;
-        nibble = (number >> (nibbles * 4)) & 0x0F;
+        nibble = (int)(number >> (nibbles * 4)) & 0x0F;
         if (nibble <= 9)
         if (nibble <= 9)
         {
         {
             UNITY_OUTPUT_CHAR((char)('0' + nibble));
             UNITY_OUTPUT_CHAR((char)('0' + nibble));