summarylogtreecommitdiffstats
path: root/gcc6.patch
blob: 99c26add9bc979ee2c6a66d06fd876f52874e539 (plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
From a168e5587671ec637178125d8b752dff38f39e68 Mon Sep 17 00:00:00 2001
From: falkTX <falktx@gmail.com>
Date: Sun, 31 Jul 2016 12:07:50 +0200
Subject: [PATCH] Fix some compiler warnings; Fix build with new gcc

---
 source/backend/engine/CarlaEngineBridge.cpp   | 1 +
 source/backend/plugin/CarlaPluginGui.cpp      | 4 ++++
 source/backend/plugin/CarlaPluginInternal.hpp | 2 ++
 source/backend/plugin/FluidSynthPlugin.cpp    | 2 +-
 source/bridges/CarlaBridgeClient.cpp          | 4 ++++
 source/bridges/CarlaBridgeOsc.cpp             | 3 +++
 source/bridges/CarlaBridgePlugin.cpp          | 6 ++++++
 source/utils/RtList.hpp                       | 5 +++--
 8 files changed, 24 insertions(+), 3 deletions(-)

diff --git a/source/backend/engine/CarlaEngineBridge.cpp b/source/backend/engine/CarlaEngineBridge.cpp
index 3e60270..91cee3b 100644
--- a/source/backend/engine/CarlaEngineBridge.cpp
+++ b/source/backend/engine/CarlaEngineBridge.cpp
@@ -267,6 +267,7 @@ class CarlaEngineBridge : public CarlaEngine,
                     if (kData->bufEvents.in != nullptr)
                     {
                         // TODO
+                        (void)data; (void)time;
                     }
 
                     break;
diff --git a/source/backend/plugin/CarlaPluginGui.cpp b/source/backend/plugin/CarlaPluginGui.cpp
index e98c744..923009a 100644
--- a/source/backend/plugin/CarlaPluginGui.cpp
+++ b/source/backend/plugin/CarlaPluginGui.cpp
@@ -67,6 +67,10 @@ CarlaPluginGui::CarlaPluginGui(CarlaEngine* const engine, Callback* const callba
         if (! lastGeometry.isNull())
             restoreGeometry(lastGeometry);
     }
+
+    return;
+    // may be unused
+    (void)engine;
 }
 
 CarlaPluginGui::~CarlaPluginGui()
diff --git a/source/backend/plugin/CarlaPluginInternal.hpp b/source/backend/plugin/CarlaPluginInternal.hpp
index 97c776a..f01e402 100644
--- a/source/backend/plugin/CarlaPluginInternal.hpp
+++ b/source/backend/plugin/CarlaPluginInternal.hpp
@@ -29,6 +29,8 @@
 
 #include "RtList.hpp"
 
+#include <cmath>
+
 #define CARLA_PROCESS_CONTINUE_CHECK if (! fEnabled) { kData->engine->callback(CALLBACK_DEBUG, fId, 0, 0, 0.0f, "Processing while plugin is disabled!!"); return; }
 
 CARLA_BACKEND_START_NAMESPACE
diff --git a/source/backend/plugin/FluidSynthPlugin.cpp b/source/backend/plugin/FluidSynthPlugin.cpp
index 301e9aa..058a586 100644
--- a/source/backend/plugin/FluidSynthPlugin.cpp
+++ b/source/backend/plugin/FluidSynthPlugin.cpp
@@ -907,7 +907,7 @@ class FluidSynthPlugin : public CarlaPlugin
         fluid_preset_t f_preset;
 
         bool hasDrums = false;
-        uint32_t drumIndex, drumProg;
+        uint32_t drumIndex = 0, drumProg = 0;
 
         f_sfont = fluid_synth_get_sfont_by_id(fSynth, fSynthId);
 
diff --git a/source/bridges/CarlaBridgeClient.cpp b/source/bridges/CarlaBridgeClient.cpp
index d2fb0a1..08ee15f 100644
--- a/source/bridges/CarlaBridgeClient.cpp
+++ b/source/bridges/CarlaBridgeClient.cpp
@@ -40,6 +40,10 @@ CarlaBridgeClient::CarlaBridgeClient(const char* const uiTitle)
     CARLA_ASSERT(uiTitle != nullptr);
 #endif
     carla_debug("CarlaBridgeClient::CarlaBridgeClient(\"%s\")", uiTitle);
+    return;
+
+    // may be unused
+    (void)uiTitle;
 }
 
 CarlaBridgeClient::~CarlaBridgeClient()
diff --git a/source/bridges/CarlaBridgeOsc.cpp b/source/bridges/CarlaBridgeOsc.cpp
index bcd2fd6..2fcc37f 100644
--- a/source/bridges/CarlaBridgeOsc.cpp
+++ b/source/bridges/CarlaBridgeOsc.cpp
@@ -207,6 +207,9 @@ int CarlaBridgeOsc::handleMessage(const char* const path, const int argc, const
 
     carla_stderr("CarlaBridgeOsc::handleMessage(\"%s\", ...) - received unsupported OSC method '%s'", path, method);
     return 1;
+
+    // may be unused
+    (void)msg;
 }
 
 #ifdef BUILD_BRIDGE_UI
diff --git a/source/bridges/CarlaBridgePlugin.cpp b/source/bridges/CarlaBridgePlugin.cpp
index 09b23c0..32b8c34 100644
--- a/source/bridges/CarlaBridgePlugin.cpp
+++ b/source/bridges/CarlaBridgePlugin.cpp
@@ -438,6 +438,9 @@ int CarlaBridgeOsc::handleMsgPluginSetParameterMidiChannel(CARLA_BRIDGE_OSC_HAND
     // TODO
 
     return 0;
+
+    // unused
+    (void)argc; (void)argv; (void)types;
 }
 
 int CarlaBridgeOsc::handleMsgPluginSetParameterMidiCC(CARLA_BRIDGE_OSC_HANDLE_ARGS)
@@ -449,6 +452,9 @@ int CarlaBridgeOsc::handleMsgPluginSetParameterMidiCC(CARLA_BRIDGE_OSC_HANDLE_AR
     // TODO
 
     return 0;
+
+    // unused
+    (void)argc; (void)argv; (void)types;
 }
 
 int CarlaBridgeOsc::handleMsgPluginSetChunk(CARLA_BRIDGE_OSC_HANDLE_ARGS)
diff --git a/source/utils/RtList.hpp b/source/utils/RtList.hpp
index 43c6715..80660b5 100644
--- a/source/utils/RtList.hpp
+++ b/source/utils/RtList.hpp
@@ -27,11 +27,12 @@ extern "C" {
 
 // Declare non copyable and prevent heap allocation
 #define LIST_DECLARATIONS(ClassName)                       \
+private:                                                   \
     ClassName(ClassName&);                                 \
     ClassName(const ClassName&);                           \
+    ClassName& operator=(ClassName&);                      \
     ClassName& operator=(const ClassName&);                \
-    static void* operator new (size_t) { return nullptr; } \
-    static void operator delete (void*) {}
+    static void* operator new (size_t);
 
 typedef struct list_head k_list_head;