File: gcc15.patch

package info (click to toggle)
sight 25.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,180 kB
  • sloc: cpp: 289,476; xml: 17,257; ansic: 9,878; python: 1,379; sh: 144; makefile: 33
file content (66 lines) | stat: -rw-r--r-- 1,908 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

--- a/lib/__/core/com/slot_run.hxx
+++ b/lib/__/core/com/slot_run.hxx
@@ -44,7 +44,7 @@ namespace sight::core::com
 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 ...);};
 }
 
 //-----------------------------------------------------------------------------
--- a/cmake/build/macros.cmake
+++ b/cmake/build/macros.cmake
@@ -1203,6 +1203,14 @@ macro(fw_manage_warnings PROJECT)
                                    "-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()
--- a/lib/io/igtl/detail/raw_message.hpp
+++ b/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 @@ public:
 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: