Skip to content

Commit 694d00d

Browse files
authored
Merge pull request #1846 from thetic/signed-hex
Fix new ClangCL warnings
2 parents 874ff06 + 7d35673 commit 694d00d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/CppUTest/SimpleString.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,12 +710,12 @@ SimpleString StringFrom(void (*value)())
710710

711711
SimpleString HexStringFrom(long value)
712712
{
713-
return StringFromFormat("%lx", value);
713+
return HexStringFrom((unsigned long)value);
714714
}
715715

716716
SimpleString HexStringFrom(int value)
717717
{
718-
return StringFromFormat("%x", value);
718+
return HexStringFrom((unsigned int)value);
719719
}
720720

721721
SimpleString HexStringFrom(signed char value)
@@ -795,7 +795,7 @@ SimpleString StringFrom(cpputest_ulonglong value)
795795

796796
SimpleString HexStringFrom(cpputest_longlong value)
797797
{
798-
return StringFromFormat("%llx", value);
798+
return HexStringFrom((cpputest_ulonglong)value);
799799
}
800800

801801
SimpleString HexStringFrom(cpputest_ulonglong value)

src/CppUTestExt/MockExpectedCall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ SimpleString MockCheckedExpectedCall::callToString()
423423
str += ", other parameters are ignored";
424424
}
425425

426-
str += StringFromFormat(" (expected %d call%s, called %d time%s)",
426+
str += StringFromFormat(" (expected %u call%s, called %u time%s)",
427427
expectedCalls_, (expectedCalls_ == 1) ? "" : "s", actualCalls_, (actualCalls_ == 1) ? "" : "s" );
428428

429429
return str;

0 commit comments

Comments
 (0)