File: gcc15.patch

package info (click to toggle)
sight 25.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 43,252 kB
  • sloc: cpp: 310,629; xml: 17,622; ansic: 9,960; python: 1,379; sh: 144; makefile: 33
file content (66 lines) | stat: -rw-r--r-- 1,877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
Description: Fix build failure with gcc15
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1097881
Author: Flavien Bridault <fbridault@ircad.fr>
Forwarded: https://git.ircad.fr/sight/sight/-/issues/1414

--- sight.orig/lib/__/core/com/slot_run.hxx
+++ sight/lib/__/core/com/slot_run.hxx
@@ -44,7 +44,7 @@
 template<typename ... A>
 inline std::function<void()> slot_run<void(A ...)>::bind_run(A ... _args) const
 {
-    return [ =, this]{run(_args ...);};
+    return [_args ..., this]{run(_args ...);};
 }
 
 //-----------------------------------------------------------------------------
--- sight.orig/cmake/build/macros.cmake
+++ sight/cmake/build/macros.cmake
@@ -1150,6 +1150,14 @@
                                    "-Wno-stringop-overread;-Wno-error=nonnull>"
             )
         endif()
+
+        if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15)
+            # disable this warning for now, GCC15 might report false positive OR GDCM does bad things in GdcmString
+            target_compile_options(
+                ${PROJECT} PRIVATE "$<$<CONFIG:Release,RelWithDebInfo,MinSizeRel>:"
+                                   "-Wno-error=maybe-uninitialized>"
+            )
+        endif()
     endif()
 
 endmacro()
--- sight.orig/lib/io/igtl/detail/raw_message.hpp
+++ sight/lib/io/igtl/detail/raw_message.hpp
@@ -29,13 +29,6 @@
 #include <string>
 #include <vector>
 
-// FIXME
-#ifndef WIN32
-    #define OVERRIDE_ON_LINUX override
-#else
-    #define OVERRIDE_ON_LINUX
-#endif
-
 namespace sight::io::igtl::detail
 {
 
@@ -95,13 +88,13 @@
 private:
 
     /// Override
-    int GetBodyPackSize() OVERRIDE_ON_LINUX; // FIXME
+    int GetBodyPackSize();
 
     /// Override
-    int PackBody() OVERRIDE_ON_LINUX; // FIXME
+    int PackBody();
 
     /// Override
-    int UnpackBody() OVERRIDE_ON_LINUX; // FIXME
+    int UnpackBody();
 
 private: