From 83d322198c4ebeddeb1d7c89e62907d249f5f4c6 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 12:59:02 +0300 Subject: [PATCH 01/23] gui: Enable `-Wextra` --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 6080be7..4cd12bc 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -9,7 +9,7 @@ ifneq (,$(findstring clang,$(CXX))) IMGUIFLAGS += -Wno-nontrivial-memcall endif -WARNFLAGS = -Wall -Wno-sign-compare +WARNFLAGS = -Wall -Wextra -Wno-sign-compare OPTIMIZATION_FLAGS = -O2 -flto=auto DEBUG_FLAGS = -g -O0 From b9b1c256a35813e07e01f2e2e6f29e3987f3451e Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 12:59:22 +0300 Subject: [PATCH 02/23] gui: Silence `-Wunused-parameter` for now --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 4cd12bc..5996f2c 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -9,7 +9,7 @@ ifneq (,$(findstring clang,$(CXX))) IMGUIFLAGS += -Wno-nontrivial-memcall endif -WARNFLAGS = -Wall -Wextra -Wno-sign-compare +WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter OPTIMIZATION_FLAGS = -O2 -flto=auto DEBUG_FLAGS = -g -O0 From 203e0464b3acdc9460b7f15b36585186e2c94c11 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:04:48 +0300 Subject: [PATCH 03/23] gui: Fix ub on copying uninitialized value (`-Wuninitialized`) SynchronousData is non-trivially copyable due to std::vector, so memcpy can't be used. Therefore copying any uninitialized value is ub here. --- gui/FunctionHelper.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/FunctionHelper.h b/gui/FunctionHelper.h index 3711923..9fa029c 100644 --- a/gui/FunctionHelper.h +++ b/gui/FunctionHelper.h @@ -53,7 +53,7 @@ class CachedFunction { static constexpr bool velocity = true; std::vector data; - double xStart; + double xStart = 1.0; } synchronous_data; bool SynchronousBuildLUT(); From 4834ba9c543e8588e35a3f7fdafd08ddc3f74511 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:11:40 +0300 Subject: [PATCH 04/23] gui: Enable `-pedantic` No new warnings generated this time (on g++)! --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 5996f2c..7ba16b3 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -9,7 +9,7 @@ ifneq (,$(findstring clang,$(CXX))) IMGUIFLAGS += -Wno-nontrivial-memcall endif -WARNFLAGS = -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wno-sign-compare -Wno-unused-parameter OPTIMIZATION_FLAGS = -O2 -flto=auto DEBUG_FLAGS = -g -O0 From a26e031859b02814cd780400320e2415ee6a9988 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:18:31 +0300 Subject: [PATCH 05/23] gui: Silence `-Woverlength-strings` on clang++ Strings longer than 65536 is a non-standard feature, let's allow it so fonts.h compiles. --- gui/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 7ba16b3..29a3cc6 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,12 +4,14 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security +WARNFLAGS = -Wall -Wextra -pedantic -Wno-sign-compare -Wno-unused-parameter + ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these IMGUIFLAGS += -Wno-nontrivial-memcall + WARNFLAGS += -Wno-overlength-strings endif -WARNFLAGS = -Wall -Wextra -pedantic -Wno-sign-compare -Wno-unused-parameter OPTIMIZATION_FLAGS = -O2 -flto=auto DEBUG_FLAGS = -g -O0 From 007984b5e050064b67c642eef5126a905c417ae9 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:23:49 +0300 Subject: [PATCH 06/23] gui: Enable `-Wnon-virtual-dtor` Warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors. --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 29a3cc6..dc20296 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Wno-sign-compare -Wno-unused-parameter ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these From f767b472bfd8ae7fceb00eb929be6a84a0528c57 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:27:40 +0300 Subject: [PATCH 07/23] gui: Enable `-Woverloaded-virtual` Warn if you overload (not override) a virtual function. --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index dc20296..64377dd 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wno-sign-compare -Wno-unused-parameter ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these From 60c63f4c2143dbb627f0ed0b14afa792512c3c35 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:29:16 +0300 Subject: [PATCH 08/23] gui: Enable `-Wmisleading-indentation` Warn if indentation implies blocks where blocks do not exist. --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 64377dd..7fe405b 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these From b4c35022b6eaa5693719d0a481529c01abc2359f Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:35:05 +0300 Subject: [PATCH 09/23] gui: Enable `-Wduplicated-cond` --- gui/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gui/Makefile b/gui/Makefile index 7fe405b..12f4685 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -6,6 +6,10 @@ CXXFLAGS = -std=c++17 -I . -isystem External IMGUIFLAGS = -Wformat=0 -Wno-format-security WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter +ifeq (g++, $(CXX)) + WARNFLAGS += -Wduplicated-cond +endif + ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these IMGUIFLAGS += -Wno-nontrivial-memcall From 2e066cb1c4fd6020b925e76a83d57e6cd776960a Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 13:37:56 +0300 Subject: [PATCH 10/23] gui: Enable `-Wduplicated-branches` warn if if / else branches have duplicated code --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 12f4685..96c9b8b 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -7,7 +7,7 @@ IMGUIFLAGS = -Wformat=0 -Wno-format-security WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) - WARNFLAGS += -Wduplicated-cond + WARNFLAGS += -Wduplicated-cond -Wduplicated-branches endif ifneq (,$(findstring clang,$(CXX))) From 770e3a66df03d95faa1b462a87185a6277a1f2d1 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 14:00:12 +0300 Subject: [PATCH 11/23] gui: Enable `-Wuseless-cast` ...and remove the single useless cast it found --- gui/DriverHelper.cpp | 2 +- gui/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/DriverHelper.cpp b/gui/DriverHelper.cpp index 79a0186..4828c46 100644 --- a/gui/DriverHelper.cpp +++ b/gui/DriverHelper.cpp @@ -152,7 +152,7 @@ namespace DriverHelper { } bool SaveParameters() { - return SetParameterTy("update", (int) 1); + return SetParameterTy("update", 1); } bool SavePersistentParameters() { diff --git a/gui/Makefile b/gui/Makefile index 96c9b8b..8854539 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -7,7 +7,7 @@ IMGUIFLAGS = -Wformat=0 -Wno-format-security WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) - WARNFLAGS += -Wduplicated-cond -Wduplicated-branches + WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast endif ifneq (,$(findstring clang,$(CXX))) From a8a78cc2b263d5dc1adab317ae3cfc387eaf3350 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sat, 18 Apr 2026 14:01:56 +0300 Subject: [PATCH 12/23] gui: Enable `-Wformat=2` Warn on security issues around functions that format output (i.e., `printf`) --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 8854539..daaf7b1 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast From f15274d1ebca1e1f73c08e90e718db84e97a6def Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:01:11 +0300 Subject: [PATCH 13/23] gui: Enable `-Wextra-semi` Warn about extraneous semicolons. --- gui/FunctionHelper.h | 2 +- gui/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gui/FunctionHelper.h b/gui/FunctionHelper.h index 9fa029c..7f3df81 100644 --- a/gui/FunctionHelper.h +++ b/gui/FunctionHelper.h @@ -22,7 +22,7 @@ class CachedFunction { CachedFunction(float xStride, Parameters *params); CachedFunction() { - }; + } float EvalFuncAt(float x) const; diff --git a/gui/Makefile b/gui/Makefile index daaf7b1..67f3e59 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast From 453ea3b359dbd50bb4b78318f76a735178a4d692 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:04:03 +0300 Subject: [PATCH 14/23] gui: Enable `-Wzero-as-null-pointer-constant` Warn when a literal '0' is used as null pointer constant. --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 67f3e59..7d10f75 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast From b1883b5332ac121e68e7d062318283699f5521eb Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:08:44 +0300 Subject: [PATCH 15/23] gui: Enable `-Winit-self` Warn if an undefined variable is used to initialize itself. --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 7d10f75..ece1c3e 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast From 1977a12feccc35101d9ebfb1ddcd2aeaf3f1e1d8 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:17:34 +0300 Subject: [PATCH 16/23] gui: Enable `-Wstring-conversion` Warn if string literal is implicitly converted to a bool --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index ece1c3e..a358be2 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -13,7 +13,7 @@ endif ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these IMGUIFLAGS += -Wno-nontrivial-memcall - WARNFLAGS += -Wno-overlength-strings + WARNFLAGS += -Wstring-conversion -Wno-overlength-strings endif OPTIMIZATION_FLAGS = -O2 -flto=auto From f6ae9f13698ec26b1a586bf0a0cb5849da328c42 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:19:27 +0300 Subject: [PATCH 17/23] gui: Enable `-Wsuggest-override` Suggest adding the override specifier to member functions that override --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index a358be2..7abfac8 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -13,7 +13,7 @@ endif ifneq (,$(findstring clang,$(CXX))) # ImGui produces many of these IMGUIFLAGS += -Wno-nontrivial-memcall - WARNFLAGS += -Wstring-conversion -Wno-overlength-strings + WARNFLAGS += -Wstring-conversion -Wsuggest-override -Wno-overlength-strings endif OPTIMIZATION_FLAGS = -O2 -flto=auto From 8fcdf8c6398aefc39d1f717418a3459af4033750 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:28:35 +0300 Subject: [PATCH 18/23] gui: Enable `-Wmissing-declarations` ...and fix the warnings it produced. --- gui/ConfigHelper.cpp | 4 ++-- gui/CustomCurve.cpp | 4 ++-- gui/DriverHelper.cpp | 4 ++-- gui/Makefile | 2 +- gui/gui.cpp | 2 +- gui/main.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gui/ConfigHelper.cpp b/gui/ConfigHelper.cpp index 4491200..401539b 100644 --- a/gui/ConfigHelper.cpp +++ b/gui/ConfigHelper.cpp @@ -3,7 +3,7 @@ #include #include -char *OpenFile() { +static char *OpenFile() { char *filename = new char[512]; char cwd[1024]; char command[2048] = R"(zenity --file-selection --title="Select a config file" 2> /dev/null)"; @@ -25,7 +25,7 @@ char *OpenFile() { return res; } -char *SaveFile() { +static char *SaveFile() { char *filename = new char[512]; char cwd[1024]; char command[2048] = R"(zenity --save --file-selection --title="Save Config" 2> /dev/null)"; diff --git a/gui/CustomCurve.cpp b/gui/CustomCurve.cpp index 66949f6..70a8f30 100644 --- a/gui/CustomCurve.cpp +++ b/gui/CustomCurve.cpp @@ -27,7 +27,7 @@ void CustomCurve::ApplyCurveConstraints() { } // Cubic Bezier derivatives -ImVec2 BezierFirstOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) { +static ImVec2 BezierFirstOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) { float u = (1 - t); float w1 = 3 * (u * u); float w2 = 6 * (u * t); @@ -35,7 +35,7 @@ ImVec2 BezierFirstOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, fl return ((p1 - p0) * w1) + ((p2 - p1) * w2) + ((p3 - p2) * w3); } -ImVec2 BezierSecondOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) { +static ImVec2 BezierSecondOrderDerivative(ImVec2 p0, ImVec2 p1, ImVec2 p2, ImVec2 p3, float t) { float u = (1 - t); float w1 = 6 * u; float w2 = 6 * t; diff --git a/gui/DriverHelper.cpp b/gui/DriverHelper.cpp index 4828c46..c4f9c9e 100644 --- a/gui/DriverHelper.cpp +++ b/gui/DriverHelper.cpp @@ -14,7 +14,7 @@ #include template -bool GetParameterTy(const std::string ¶m_name, Ty &value) { +static bool GetParameterTy(const std::string ¶m_name, Ty &value) { try { using namespace std; ifstream file(YEETMOUSE_PARAMS_DIR + param_name); @@ -31,7 +31,7 @@ bool GetParameterTy(const std::string ¶m_name, Ty &value) { } } -bool GetParameterTy(const std::string ¶m_name, std::string &value) { +static bool GetParameterTy(const std::string ¶m_name, std::string &value) { try { using namespace std; ifstream file(YEETMOUSE_PARAMS_DIR + param_name); diff --git a/gui/Makefile b/gui/Makefile index 7abfac8..493cc61 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast diff --git a/gui/gui.cpp b/gui/gui.cpp index 5987251..e5e45fb 100755 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -17,7 +17,7 @@ static void glfw_error_callback(int error, const char* description) // Use the default initialization that comes with ImGui as an Example -void SetupImGuiStyle() +static void SetupImGuiStyle() { // nice dark style from ImThemes ImGuiStyle& style = ImGui::GetStyle(); diff --git a/gui/main.cpp b/gui/main.cpp index 1a93643..669fbfa 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -47,7 +47,7 @@ void ResetParameters(); if(selected_device >= devices.size()) \ selected_device = devices.size() - 1;} -int OnGui() { +static int OnGui() { using namespace std::chrono; ImGuiContext &g = *GImGui; From 67982d1fff8a59a8a77525c803ecf3783f1ff606 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:42:06 +0300 Subject: [PATCH 19/23] gui: Enable `-Wdeprecated` Warn about all deprecated features --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 493cc61..4cf33fb 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast From 07d56564e22d7207c04ba1ab411c5409ef79ba41 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:44:59 +0300 Subject: [PATCH 20/23] gui: Enable `-Wlogical-op` Warn about suspicious uses of logical operators --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 4cf33fb..3fdc5bd 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -7,7 +7,7 @@ IMGUIFLAGS = -Wformat=0 -Wno-format-security WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) - WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast + WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast -Wlogical-op endif ifneq (,$(findstring clang,$(CXX))) From 17c466f22e83fa924b86ee24724598c19e0321f8 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:48:00 +0300 Subject: [PATCH 21/23] gui: Enable `-Wcast-qual` Warn if casting removes const or volatile --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 3fdc5bd..46670e0 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast -Wlogical-op From 8b7e308ae580e1f232290018d3679a3d40bc3abd Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:50:11 +0300 Subject: [PATCH 22/23] gui: Enable `-Wcast-align` Warn if casting increases the required alignment of the data --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 46670e0..712569e 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wcast-align -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast -Wlogical-op From aa6cb44d42e70b462e130a88145c386a704b71c7 Mon Sep 17 00:00:00 2001 From: delet-this <33498862+delet-this@users.noreply.github.com> Date: Sun, 19 Apr 2026 14:52:33 +0300 Subject: [PATCH 23/23] gui: Enable `-Wctor-dtor-privacy` Warn if a class seems unusable due to everything being private --- gui/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/Makefile b/gui/Makefile index 712569e..277d3d9 100644 --- a/gui/Makefile +++ b/gui/Makefile @@ -4,7 +4,7 @@ CXXFLAGS = -std=c++17 -I . -isystem External # ImPlot has few of these IMGUIFLAGS = -Wformat=0 -Wno-format-security -WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wcast-align -Wno-sign-compare -Wno-unused-parameter +WARNFLAGS = -Wall -Wextra -pedantic -Wnon-virtual-dtor -Woverloaded-virtual -Wmisleading-indentation -Wformat=2 -Wextra-semi -Wzero-as-null-pointer-constant -Winit-self -Wmissing-declarations -Wdeprecated -Wcast-qual -Wcast-align -Wctor-dtor-privacy -Wno-sign-compare -Wno-unused-parameter ifeq (g++, $(CXX)) WARNFLAGS += -Wduplicated-cond -Wduplicated-branches -Wuseless-cast -Wlogical-op