Add warnings to building with GCC/Clang.
Add warnings to building with GCC/Clang.

* These were mostly copied from the old Makefile.
* The files including wxWidgets need -Wno-old-style-cast done in the code via pragmas because I do not want to disable that warning for the rest of the files. (It might've been overkill for some places where wxWidgets was included, but whatever.)

--- a/src/in_2sf/CMakeLists.txt
+++ b/src/in_2sf/CMakeLists.txt
@@ -66,7 +66,7 @@
 	spu/sampledata.h
 	XSFConfig_2SF.h
 	XSFConfigDialog_2SF.h)
-set(SOURCES
+set(DESMUME_SOURCES
 	desmume/addons/slot1_retail.cpp
 	desmume/arm_instructions.cpp
 	desmume/arm_jit.cpp
@@ -112,12 +112,24 @@
 	spu/adpcmdecoder.cpp
 	spu/interpolator.cpp
 	spu/samplecache.cpp
-	spu/sampledata.cpp
+	spu/sampledata.cpp)
+set(SOURCES
+	${DESMUME_SOURCES}
 	XSFConfig_2SF.cpp
 	XSFConfigDialog_2SF.cpp
 	XSFPlayer_2SF.cpp)
 
+set(DESMUME_COMPILE_OPTIONS
+	$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-shadow -Wno-unused-parameter -Wno-unused-value -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-function -Wno-implicit-fallthrough -Wno-old-style-cast -Wno-deprecated-copy
+		-Wno-sign-compare -Wno-float-equal -Wno-missing-braces>
+	$<$<CXX_COMPILER_ID:GNU>:-Wno-class-memaccess -Wno-unused-but-set-variable>
+	$<$<CXX_COMPILER_ID:Clang>:-Wno-array-bounds>)
+
+set_source_files_properties(${DESMUME_SOURCES} PROPERTIES
+	COMPILE_OPTIONS "${DESMUME_COMPILE_OPTIONS}")
+
 add_library(in_2sf SHARED ${HEADERS} ${SOURCES})
+set_target_properties(in_2sf PROPERTIES PREFIX "")
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
 target_compile_options(in_2sf PUBLIC

--- a/src/in_2sf/XSFConfigDialog_2SF.cpp
+++ b/src/in_2sf/XSFConfigDialog_2SF.cpp
@@ -6,17 +6,29 @@
  */
 
 #include <string>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/arrstr.h>
 #include <wx/choice.h>
 #include <wx/gbsizer.h>
 #include <wx/listbox.h>
 #include <wx/stattext.h>
 #include <wx/valgen.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfig.h"
 #include "XSFConfigDialog.h"
 #include "XSFConfigDialog_2SF.h"
 
-XSFConfigDialog_2SF::XSFConfigDialog_2SF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title)
+XSFConfigDialog_2SF::XSFConfigDialog_2SF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title)
 {
 	auto interpolationLabel = new wxStaticText(this->outputPanel, wxID_ANY, "Interpolation");
 	this->outputSizer->Add(interpolationLabel, { 4, 0 }, { 1, 1 }, wxALIGN_CENTER_VERTICAL | wxALL, 5);

--- a/src/in_2sf/XSFConfigDialog_2SF.h
+++ b/src/in_2sf/XSFConfigDialog_2SF.h
@@ -7,7 +7,19 @@
 
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/dynarray.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfigDialog.h"
 
 class wxString;
@@ -17,7 +29,7 @@
 class XSFConfigDialog_2SF : public XSFConfigDialog
 {
 public:
-	XSFConfigDialog_2SF(XSFConfig &config, wxWindow *parent, const wxString &title);
+	XSFConfigDialog_2SF(XSFConfig &newConfig, wxWindow *parent, const wxString &title);
 
 	int interpolation;
 	wxArrayInt mute;

--- a/src/in_gsf/CMakeLists.txt
+++ b/src/in_gsf/CMakeLists.txt
@@ -15,7 +15,7 @@
 	vbam/gba/Sound.h
 	XSFConfig_GSF.h
 	XSFConfigDialog_GSF.h)
-set(SOURCES
+set(VBAM_SOURCES
 	vbam/apu/Blip_Buffer.cpp
 	vbam/apu/Gb_Apu.cpp
 	vbam/apu/Gb_Oscs.cpp
@@ -25,12 +25,22 @@
 	vbam/gba/GBA-arm.cpp
 	vbam/gba/GBA-thumb.cpp
 	vbam/gba/Globals.cpp
-	vbam/gba/Sound.cpp
+	vbam/gba/Sound.cpp)
+set(SOURCES
+	${VBAM_SOURCES}
 	XSFConfig_GSF.cpp
 	XSFConfigDialog_GSF.cpp
 	XSFPlayer_GSF.cpp)
 
+set(VBAM_COMPILE_OPTIONS
+	$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-unused-variable -Wno-implicit-fallthrough>
+	$<$<CXX_COMPILER_ID:GNU>:-Wno-unused-but-set-variable>)
+
+set_source_files_properties(${VBAM_SOURCES} PROPERTIES
+	COMPILE_OPTIONS "${VBAM_COMPILE_OPTIONS}")
+
 add_library(in_gsf SHARED ${HEADERS} ${SOURCES})
+set_target_properties(in_gsf PROPERTIES PREFIX "")
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
 target_compile_options(in_gsf PUBLIC

--- a/src/in_gsf/XSFConfigDialog_GSF.cpp
+++ b/src/in_gsf/XSFConfigDialog_GSF.cpp
@@ -5,17 +5,29 @@
  * Partially based on the vio*sf framework
  */
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/arrstr.h>
 #include <wx/checkbox.h>
 #include <wx/gbsizer.h>
 #include <wx/listbox.h>
 #include <wx/stattext.h>
 #include <wx/valgen.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfig.h"
 #include "XSFConfigDialog.h"
 #include "XSFConfigDialog_GSF.h"
 
-XSFConfigDialog_GSF::XSFConfigDialog_GSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title)
+XSFConfigDialog_GSF::XSFConfigDialog_GSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title)
 {
 	auto lowPassFilteringCheckBox = new wxCheckBox(this->outputPanel, wxID_ANY, "Low-Pass Filtering", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->lowPassFiltering });
 	this->outputSizer->Add(lowPassFilteringCheckBox, { 4, 0 }, { 1, 2 }, wxALL, 5);

--- a/src/in_gsf/XSFConfigDialog_GSF.h
+++ b/src/in_gsf/XSFConfigDialog_GSF.h
@@ -7,7 +7,19 @@
 
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/dynarray.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfigDialog.h"
 
 class wxString;
@@ -17,7 +29,7 @@
 class XSFConfigDialog_GSF : public XSFConfigDialog
 {
 public:
-	XSFConfigDialog_GSF(XSFConfig &config, wxWindow *parent, const wxString &title);
+	XSFConfigDialog_GSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title);
 
 	bool lowPassFiltering;
 	wxArrayInt mute;

--- a/src/in_ncsf/CMakeLists.txt
+++ b/src/in_ncsf/CMakeLists.txt
@@ -39,6 +39,7 @@
 	XSFPlayer_NCSF.cpp)
 
 add_library(in_ncsf SHARED ${HEADERS} ${RESOURCES} ${SOURCES})
+set_target_properties(in_ncsf PROPERTIES PREFIX "")
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
 source_group("Resource Files" FILES ${RESOURCES})
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})

--- a/src/in_ncsf/XSFConfigDialog_NCSF.cpp
+++ b/src/in_ncsf/XSFConfigDialog_NCSF.cpp
@@ -6,6 +6,13 @@
  */
 
 #include <string>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/arrstr.h>
 #include <wx/checkbox.h>
 #include <wx/choice.h>
@@ -13,11 +20,16 @@
 #include <wx/listbox.h>
 #include <wx/stattext.h>
 #include <wx/valgen.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfig.h"
 #include "XSFConfigDialog.h"
 #include "XSFConfigDialog_NCSF.h"
 
-XSFConfigDialog_NCSF::XSFConfigDialog_NCSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title)
+XSFConfigDialog_NCSF::XSFConfigDialog_NCSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title)
 {
 #ifndef NDEBUG
 	auto useSoundViewCheckBox = new wxCheckBox(this->generalPanel, wxID_ANY, "Use Sound View Window", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->useSoundView });

--- a/src/in_ncsf/XSFConfigDialog_NCSF.h
+++ b/src/in_ncsf/XSFConfigDialog_NCSF.h
@@ -7,7 +7,19 @@
 
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/dynarray.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfigDialog.h"
 
 class wxString;
@@ -17,7 +29,7 @@
 class XSFConfigDialog_NCSF : public XSFConfigDialog
 {
 public:
-	XSFConfigDialog_NCSF(XSFConfig &config, wxWindow *parent, const wxString &title);
+	XSFConfigDialog_NCSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title);
 
 #ifndef NDEBUG
 	bool useSoundView;

--- a/src/in_ncsf/XSFConfig_NCSF.h
+++ b/src/in_ncsf/XSFConfig_NCSF.h
@@ -54,9 +54,6 @@
 
 	friend class XSFConfig;
 	friend struct SoundViewData;
-#ifndef NDEBUG
-	bool useSoundViewDialog;
-#endif
 	unsigned interpolation;
 	std::bitset<16> mutes;
 
@@ -69,6 +66,7 @@
 	void CopySpecificConfigToMemory(XSFPlayer *xSFPlayer, bool preLoad) override;
 
 #ifndef NDEBUG
+	bool useSoundViewDialog;
 	std::unique_ptr<SoundViewData> soundViewData;
 
 	static INT_PTR CALLBACK SoundViewDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

--- a/src/in_ncsf/XSFPlayer_NCSF.h
+++ b/src/in_ncsf/XSFPlayer_NCSF.h
@@ -31,10 +31,10 @@
 	std::unique_ptr<SDAT> sdat;
 	Player player;
 	double secondsPerSample, secondsIntoPlayback, secondsUntilNextClock;
+	std::bitset<16> mutes;
 #ifndef NDEBUG
 	bool useSoundViewDialog;
 #endif
-	std::bitset<16> mutes;
 
 	void MapNCSFSection(const std::vector<std::uint8_t> &section);
 	bool MapNCSF(XSFFile *xSFToLoad);

--- a/src/in_snsf/CMakeLists.txt
+++ b/src/in_snsf/CMakeLists.txt
@@ -26,7 +26,7 @@
 	snes9x/snes9x.h
 	XSFConfig_SNSF.h
 	XSFConfigDialog_SNSF.h)
-set(SOURCES
+set(SNES9X_SOURCES
 	snes9x/apu/apu.cpp
 	snes9x/apu/SNES_SPC.cpp
 	snes9x/apu/SNES_SPC_misc.cpp
@@ -38,12 +38,21 @@
 	snes9x/globals.cpp
 	snes9x/memmap.cpp
 	snes9x/ppu.cpp
-	snes9x/sdd1.cpp
+	snes9x/sdd1.cpp)
+set(SOURCES
+	${SNES9X_SOURCES}
 	XSFConfig_SNSF.cpp
 	XSFConfigDialog_SNSF.cpp
 	XSFPlayer_SNSF.cpp)
 
+set(SNES9X_COMPILE_OPTIONS
+	$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wno-implicit-fallthrough -Wno-shift-negative-value>)
+
+set_source_files_properties(${SNES9X_SOURCES} PROPERTIES
+	COMPILE_OPTIONS "${SNES9X_COMPILE_OPTIONS}")
+
 add_library(in_snsf SHARED ${HEADERS} ${SOURCES})
+set_target_properties(in_snsf PROPERTIES PREFIX "")
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Header Files" FILES ${HEADERS})
 source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX "Source Files" FILES ${SOURCES})
 target_compile_options(in_snsf PUBLIC

--- a/src/in_snsf/XSFConfigDialog_SNSF.cpp
+++ b/src/in_snsf/XSFConfigDialog_SNSF.cpp
@@ -6,6 +6,13 @@
  */
 
 #include <string>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/arrstr.h>
 #include <wx/checkbox.h>
 #include <wx/choice.h>
@@ -13,11 +20,16 @@
 #include <wx/listbox.h>
 #include <wx/stattext.h>
 #include <wx/valgen.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfig.h"
 #include "XSFConfigDialog.h"
 #include "XSFConfigDialog_SNSF.h"
 
-XSFConfigDialog_SNSF::XSFConfigDialog_SNSF(XSFConfig &config, wxWindow *parent, const wxString &title) : XSFConfigDialog(config, parent, title)
+XSFConfigDialog_SNSF::XSFConfigDialog_SNSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : XSFConfigDialog(newConfig, parent, title)
 {
 	auto reverseStereoCheckBox = new wxCheckBox(this->outputPanel, wxID_ANY, "Reverse Stereo", wxDefaultPosition, wxDefaultSize, 0, wxGenericValidator{ &this->reverseStereo });
 	this->outputSizer->Add(reverseStereoCheckBox, { 4, 0 }, { 1, 2 }, wxALL, 5);

--- a/src/in_snsf/XSFConfigDialog_SNSF.h
+++ b/src/in_snsf/XSFConfigDialog_SNSF.h
@@ -7,7 +7,19 @@
 
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/dynarray.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "XSFConfigDialog.h"
 
 class wxString;
@@ -17,7 +29,7 @@
 class XSFConfigDialog_SNSF : public XSFConfigDialog
 {
 public:
-	XSFConfigDialog_SNSF(XSFConfig &config, wxWindow *parent, const wxString &title);
+	XSFConfigDialog_SNSF(XSFConfig &newConfig, wxWindow *parent, const wxString &title);
 
 	bool reverseStereo;
 	int resampler;

--- a/src/in_xsf_framework/CMakeLists.txt
+++ b/src/in_xsf_framework/CMakeLists.txt
@@ -236,10 +236,13 @@
 source_group("Source Files" ${SOURCES})
 target_compile_definitions(in_xsf_framework PUBLIC
 	_CRT_SECURE_NO_WARNINGS
+	_WINDOWS
 	WINAMP_PLUGIN
 	UNICODE_INPUT_PLUGIN
 	$<$<AND:$<CXX_COMPILER_ID:MSVC>,$<CONFIG:Debug>>:_ITERATOR_DEBUG_LEVEL=0>)
 target_compile_options(in_xsf_framework PUBLIC
+	$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:GNU>>:-Wall -Wctor-dtor-privacy -Wold-style-cast -Wextra -Wno-div-by-zero -Wfloat-equal -Wshadow -Winit-self -Wcast-qual -Wunreachable-code -Woverloaded-virtual -Wno-long-long -Wno-switch>
+	$<$<CXX_COMPILER_ID:GNU>:-Wlogical-op>
 	$<$<CXX_COMPILER_ID:MSVC>:/W4 /wd4244 /wd6258 /wd26451 /wd28159>)
 target_include_directories(in_xsf_framework PUBLIC
 	${CMAKE_CURRENT_SOURCE_DIR}

--- a/src/in_xsf_framework/RegExValidator.cpp
+++ b/src/in_xsf_framework/RegExValidator.cpp
@@ -1,5 +1,17 @@
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/object.h>
 #include <wx/string.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "RegExValidator.h"
 
 RegExValidator::RegExValidator(const wxString &regExpString, wxString *valPtr, int regExpFlags) : wxTextValidator(wxFILTER_EMPTY, valPtr), regEx(regExpString, regExpFlags), regExString(regExpString), regExFlags(regExpFlags)

--- a/src/in_xsf_framework/RegExValidator.h
+++ b/src/in_xsf_framework/RegExValidator.h
@@ -1,8 +1,20 @@
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/regex.h>
 #include <wx/string.h>
 #include <wx/valtext.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 
 class wxObject;
 

--- a/src/in_xsf_framework/XSFConfig.cpp
+++ b/src/in_xsf_framework/XSFConfig.cpp
@@ -9,8 +9,20 @@
 #include <string>
 #include <type_traits>
 #include <vector>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/app.h>
 #include <wx/nativewin.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "windowsh_wrapper.h"
 #include <windowsx.h>
 #include "XSFConfig.h"
@@ -101,7 +113,7 @@
 	{
 	}
 
-	XSFConfigApp(HWND parent, XSFConfig *config) : parent(parent), config(config)
+	XSFConfigApp(HWND newParent, XSFConfig *newConfig) : parent(newParent), config(newConfig)
 	{
 	}
 
@@ -124,7 +136,19 @@
 	}
 };
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 wxIMPLEMENT_APP_NO_MAIN(XSFConfigApp);
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 
 void XSFConfig::GenerateDialogs()
 {

--- a/src/in_xsf_framework/XSFConfigDialog.cpp
+++ b/src/in_xsf_framework/XSFConfigDialog.cpp
@@ -6,6 +6,13 @@
  */
 
 #include <string>
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/button.h>
 #include <wx/checkbox.h>
 #include <wx/choice.h>
@@ -19,6 +26,11 @@
 #include <wx/valgen.h>
 #include <wx/valnum.h>
 #include <wx/window.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 #include "RegExValidator.h"
 #include "XSFConfig.h"
 #include "XSFConfigDialog.h"
@@ -29,7 +41,7 @@
 };
 
 // This just sets up the base dialog box's controls, it does not do the auto-sizing at this stage.
-XSFConfigDialog::XSFConfigDialog(XSFConfig &config, wxWindow *parent, const wxString &title) : wxDialog(parent, wxID_ANY, title), config(config)
+XSFConfigDialog::XSFConfigDialog(XSFConfig &newConfig, wxWindow *parent, const wxString &title) : wxDialog(parent, wxID_ANY, title), config(newConfig)
 {
 	this->mainSizer = new wxGridBagSizer;
 

--- a/src/in_xsf_framework/XSFConfigDialog.h
+++ b/src/in_xsf_framework/XSFConfigDialog.h
@@ -7,9 +7,21 @@
 
 #pragma once
 
+#ifdef __GNUC__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wold-style-cast"
+#elif defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wold-style-cast"
+#endif
 #include <wx/msw/winundef.h>
 #include <wx/dialog.h>
 #include <wx/string.h>
+#ifdef __GNUC__
+# pragma GCC diagnostic pop
+#elif defined(__clang__)
+# pragma clang diagnostic pop
+#endif
 
 class wxGridBagSizer;
 class wxPanel;
@@ -23,7 +35,7 @@
 	wxGridBagSizer *mainSizer;
 	XSFConfig &config;
 public:
-	XSFConfigDialog(XSFConfig &config, wxWindow *parent, const wxString &title);
+	XSFConfigDialog(XSFConfig &newConfig, wxWindow *parent, const wxString &title);
 	void Finalize();
 
 	wxPanel *generalPanel;