Description: Fix tests to work on 32bit platforms.
Author: Joachim Reichel <reichel@debian.org>
Bug: https://trac.cppcheck.net/ticket/10282, https://trac.cppcheck.net/ticket/10417

Index: cppcheck/test/testexprengine.cpp
===================================================================
--- cppcheck.orig/test/testexprengine.cpp
+++ cppcheck/test/testexprengine.cpp
@@ -818,12 +818,14 @@ private:
                             "  *x = 2;\n"
                             "  *x = 1;\n"
                             "}";
+#if __SIZEOF_POINTER__ >= 8
         ASSERT_EQUALS("1:28: $2=ArrayValue([$1],[:]=?,null)\n"
                       "1:28: $1=IntRange(1:2147483647)\n"
                       "1:28: D0:memory:{x=($2,[$1],[:]=?)}\n"
                       "2:9: D0:memory:{x=($2,[$1],[:]=?,[0]=2)}\n"
                       "3:9: D0:memory:{x=($2,[$1],[:]=?,[0]=1)}\n",
                       trackExecution(code));
+#endif
     }
 
     void arrayInit1() {
Index: cppcheck/test/test64bit.cpp
===================================================================
--- cppcheck.orig/test/test64bit.cpp
+++ cppcheck/test/test64bit.cpp
@@ -80,6 +80,7 @@ private:
     }
 
     void functionpar() {
+#if __SIZEOF_POINTER__ >= 8
         check("int foo(int *p)\n"
               "{\n"
               "    int a = p;\n"
@@ -107,6 +108,7 @@ private:
               "    *p = 0;\n"
               "}");
         ASSERT_EQUALS("[test.cpp:3]: (portability) Assigning an integer to a pointer is not portable.\n", errout.str());
+#endif
 
         check("int f(const char *p) {\n" // #4659
               "    return 6 + p[2] * 256;\n"
@@ -156,11 +158,13 @@ private:
     }
 
     void structmember() {
+#if __SIZEOF_POINTER__ >= 8
         check("struct Foo { int *p; };\n"
               "void f(struct Foo *foo) {\n"
               "    int i = foo->p;\n"
               "}");
         ASSERT_EQUALS("[test.cpp:3]: (portability) Assigning a pointer to an integer is not portable.\n", errout.str());
+#endif
     }
 
     void ptrcompare() {
@@ -185,11 +189,13 @@ private:
               "}");
         ASSERT_EQUALS("", errout.str());
 
+#if __SIZEOF_POINTER__ >= 8
         check("void foo(int *p) {\n"
               "    int x = 10;\n"
               "    int *a = x * x;\n"
               "}");
         ASSERT_EQUALS("[test.cpp:3]: (portability) Assigning an integer to a pointer is not portable.\n", errout.str());
+#endif
 
         check("void foo(int *start, int *end) {\n"
               "    int len;\n"
@@ -199,10 +205,12 @@ private:
     }
 
     void returnIssues() {
+#if __SIZEOF_POINTER__ >= 8
         check("void* foo(int i) {\n"
               "    return i;\n"
               "}");
         ASSERT_EQUALS("[test.cpp:2]: (portability) Returning an integer in a function with pointer return type is not portable.\n", errout.str());
+#endif
 
         check("void* foo(int* i) {\n"
               "    return i;\n"
@@ -226,6 +234,7 @@ private:
               "}");
         ASSERT_EQUALS("", errout.str());
 
+#if __SIZEOF_POINTER__ >= 8
         check("int foo(char* c) {\n"
               "    return c;\n"
               "}");
@@ -235,6 +244,7 @@ private:
               "    return 1+c;\n"
               "}");
         ASSERT_EQUALS("[test.cpp:2]: (portability) Returning an address value in a function with integer return type is not portable.\n", errout.str());
+#endif
 
         check("std::string foo(char* c) {\n"
               "    return c;\n"
