File 270f3e112.patch of Package pointcloud

From 270f3e1125193b291dc722c65cd97b6284414357 Mon Sep 17 00:00:00 2001
From: Blottiere Paul <blottiere.paul@gmail.com>
Date: Tue, 16 Jun 2020 22:14:15 +0200
Subject: [PATCH] Fix compilation with GCC 10.1

---
 lib/cunit/cu_tester.c | 3 +++
 lib/cunit/cu_tester.h | 8 +++++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lib/cunit/cu_tester.c b/lib/cunit/cu_tester.c
index 344a77cd..613db1a1 100644
--- a/lib/cunit/cu_tester.c
+++ b/lib/cunit/cu_tester.c
@@ -12,6 +12,9 @@
 #include "CUnit/Basic.h"
 #include "cu_tester.h"
 
+/* Contains the most recent error message generated by rterror. */
+static char cu_error_msg[MAX_CUNIT_MSG_LENGTH+1];
+
 /* ADD YOUR SUITE HERE (1 of 2) */
 extern CU_SuiteInfo schema_suite;
 extern CU_SuiteInfo patch_suite;
diff --git a/lib/cunit/cu_tester.h b/lib/cunit/cu_tester.h
index 1c195cf1..60613a0e 100644
--- a/lib/cunit/cu_tester.h
+++ b/lib/cunit/cu_tester.h
@@ -7,6 +7,9 @@
 *
 ***********************************************************************/
 
+#ifndef _CU_TESTER_H
+#define _CU_TESTER_H
+
 #include "pc_api_internal.h"
 
 #define PC_TEST(test_func) { #test_func, test_func }
@@ -14,11 +17,10 @@
 #define CU_ASSERT_SUCCESS(rv) CU_ASSERT( (rv) == PC_SUCCESS )
 #define CU_ASSERT_FAILURE(rv) CU_ASSERT( (rv) == PC_FAILURE )
 
-/* Contains the most recent error message generated by rterror. */
-char cu_error_msg[MAX_CUNIT_MSG_LENGTH+1];
-
 /* Read a file (XML) into a cstring */
 char* file_to_str(const char *fname);
 
 /* Resets cu_error_msg back to blank. */
 void cu_error_msg_reset(void);
+
+#endif
openSUSE Build Service is sponsored by