Description: Disable tests not working on 32bit platforms.
Author: Joachim Reichel <reichel@debian.org>
Bug: https://trac.cppcheck.net/ticket/10282,
     https://trac.cppcheck.net/ticket/10417,
     https://trac.cppcheck.net/ticket/12300

Index: cppcheck/test/test64bit.cpp
===================================================================
--- cppcheck.orig/test/test64bit.cpp
+++ cppcheck/test/test64bit.cpp
@@ -82,6 +82,7 @@ private:
     }
 
     void functionpar() {
+#if __SIZEOF_POINTER__ >= 8
         check("int foo(int *p)\n"
               "{\n"
               "    int a = p;\n"
@@ -109,6 +110,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"
@@ -163,6 +165,7 @@ private:
     }
 
     void structmember() {
+#if __SIZEOF_POINTER__ >= 8
         check("struct Foo { int *p; };\n"
               "void f(struct Foo *foo) {\n"
               "    int i = foo->p;\n"
@@ -178,6 +181,7 @@ private:
               "    s.e = S::E::e1;\n"
               "}\n");
         ASSERT_EQUALS("", errout.str());
+#endif
     }
 
     void ptrcompare() {
@@ -202,11 +206,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"
@@ -216,10 +222,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"
@@ -243,6 +251,7 @@ private:
               "}");
         ASSERT_EQUALS("", errout.str());
 
+#if __SIZEOF_POINTER__ >= 8
         check("int foo(char* c) {\n"
               "    return c;\n"
               "}");
@@ -252,6 +261,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"
Index: cppcheck/test/testother.cpp
===================================================================
--- cppcheck.orig/test/testother.cpp
+++ cppcheck/test/testother.cpp
@@ -2173,6 +2173,7 @@ private:
               "}\n");
         ASSERT_EQUALS("[test.cpp:1]: (performance) Function parameter 't' should be passed by const reference.\n", errout.str());
 
+#if __SIZEOF_POINTER__ >= 8
         check("struct S {\n" // #12138
               "    union {\n"
               "        int a = 0;\n"
@@ -2191,6 +2192,7 @@ private:
               "    if (s.x > s.y) {}\n"
               "}\n");
         ASSERT_EQUALS("", errout.str());
+#endif
 
         check("struct S { std::list<int> l; };\n" // #12147
               "class C { public: std::list<int> l; };\n"
