From 8fb2c00fc1eb9658d6a196a53f4a7470788a2eff Mon Sep 17 00:00:00 2001 From: Kai Ni Date: Wed, 6 Jan 2010 18:59:14 +0000 Subject: [PATCH] fixed the compilation warnings in CppUnitLite --- CppUnitLite/Failure.cpp | 4 ++-- CppUnitLite/TestResult.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CppUnitLite/Failure.cpp b/CppUnitLite/Failure.cpp index a422bc975..454210e82 100644 --- a/CppUnitLite/Failure.cpp +++ b/CppUnitLite/Failure.cpp @@ -27,8 +27,8 @@ Failure::Failure (const SimpleString& theTestName, fileName (theFileName), lineNumber (theLineNumber) { - char *part1 = "expected "; - char *part3 = " but was: "; + const char *part1 = "expected "; + const char *part3 = " but was: "; char *stage = new char [strlen (part1) + expected.size () diff --git a/CppUnitLite/TestResult.cpp b/CppUnitLite/TestResult.cpp index 32acc2718..201874c1d 100644 --- a/CppUnitLite/TestResult.cpp +++ b/CppUnitLite/TestResult.cpp @@ -34,7 +34,7 @@ void TestResult::addFailure (const Failure& failure) void TestResult::testsEnded () { if (failureCount > 0) - fprintf (stdout, "There were %ld failures\n", failureCount); + fprintf (stdout, "There were %d failures\n", failureCount); else fprintf (stdout, "There were no test failures\n"); }