From b7030fcfa17fb62ecfe080816097d9766240f017 Mon Sep 17 00:00:00 2001 From: Alexander Mai Date: Sun, 22 Nov 2015 16:56:44 +0100 Subject: [PATCH] Fix compiler error (VS2010) and warning --- lib/checkfunctions.cpp | 2 +- test/testmathlib.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/checkfunctions.cpp b/lib/checkfunctions.cpp index 6c682283a..2542a7f7d 100644 --- a/lib/checkfunctions.cpp +++ b/lib/checkfunctions.cpp @@ -285,4 +285,4 @@ void CheckFunctions::checkLibraryMatchFunctions() "--check-library: There is no matching configuration for function " + tok->str() + "()"); } } -} \ No newline at end of file +} diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index 94b615b78..44a02a49c 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -271,12 +271,14 @@ private: // from char ASSERT_EQUALS((int)('A'), MathLib::toLongNumber("'A'")); +#ifdef __GNUC__ // BEGIN Implementation-specific results ASSERT_EQUALS((int)('AB'), MathLib::toLongNumber("'AB'")); ASSERT_EQUALS((int)('ABC'), MathLib::toLongNumber("'ABC'")); ASSERT_EQUALS((int)('ABCD'), MathLib::toLongNumber("'ABCD'")); ASSERT_EQUALS((int)('ABCDE'), MathLib::toLongNumber("'ABCDE'")); // END Implementation-specific results +#endif ASSERT_EQUALS((int)('\0'), MathLib::toLongNumber("'\\0'")); ASSERT_EQUALS((int)('\r'), MathLib::toLongNumber("'\\r'")); ASSERT_EQUALS((int)('\x12'), MathLib::toLongNumber("'\\x12'")); @@ -313,10 +315,10 @@ private: // from long long /* - * ASSERT_EQUALS(0xFF00000000000000LL, MathLib::toLongNumber("0xFF00000000000000LL")); + * ASSERT_EQUALS(0xFF00000000000000LL, MathLib::toLongNumber("0xFF00000000000000LL")); * This does not work in a portable way! * While it succeeds on 32bit Visual Studio it fails on Linux 64bit because it is greater than 0x7FFFFFFFFFFFFFFF (=LLONG_MAX) - */ + */ ASSERT_EQUALS(0x0A00000000000000LL, MathLib::toLongNumber("0x0A00000000000000LL")); }