File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -106,9 +106,9 @@ static void printValueTree(FILE* fout,
106
106
for (Json::ArrayIndex index = 0 ; index < size; ++index ) {
107
107
static char buffer[16 ];
108
108
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
109
- sprintf_s (buffer, sizeof (buffer), " [%d ]" , index );
109
+ sprintf_s (buffer, sizeof (buffer), " [%u ]" , index );
110
110
#else
111
- snprintf (buffer, sizeof (buffer), " [%d ]" , index );
111
+ snprintf (buffer, sizeof (buffer), " [%u ]" , index );
112
112
#endif
113
113
printValueTree (fout, value[index ], path + buffer);
114
114
}
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ void TestResult::printFailure(bool printTestName) const {
165
165
const Failure& failure = *it;
166
166
JSONCPP_STRING indent (failure.nestingLevel_ * 2 , ' ' );
167
167
if (failure.file_ ) {
168
- printf (" %s%s(%d ): " , indent.c_str (), failure.file_ , failure.line_ );
168
+ printf (" %s%s(%u ): " , indent.c_str (), failure.file_ , failure.line_ );
169
169
}
170
170
if (!failure.expr_ .empty ()) {
171
171
printf (" %s\n " , failure.expr_ .c_str ());
@@ -281,7 +281,7 @@ bool Runner::runAllTest(bool printSummary) const {
281
281
282
282
if (failures.empty ()) {
283
283
if (printSummary) {
284
- printf (" All %d tests passed\n " , count);
284
+ printf (" All %u tests passed\n " , count);
285
285
}
286
286
return true ;
287
287
} else {
@@ -293,7 +293,7 @@ bool Runner::runAllTest(bool printSummary) const {
293
293
if (printSummary) {
294
294
unsigned int failedCount = static_cast <unsigned int >(failures.size ());
295
295
unsigned int passedCount = count - failedCount;
296
- printf (" %d/%d tests passed (%d failure(s))\n " , passedCount, count,
296
+ printf (" %u/%u tests passed (%u failure(s))\n " , passedCount, count,
297
297
failedCount);
298
298
}
299
299
return false ;
You can’t perform that action at this time.
0 commit comments