Apply warning flags to RemoteVstPlugin too (#7389)

This commit is contained in:
Dominic Clark
2024-07-27 17:23:34 +01:00
committed by GitHub
parent 592da1cac7
commit 627209ad1d
5 changed files with 85 additions and 70 deletions

View File

@@ -33,6 +33,7 @@ set(export_variables
"LMMS_BUILD_WIN32"
"PLUGIN_DIR"
"LMMS_HAVE_LIBRT"
"USE_WERROR"
)
SET(EXTERNALPROJECT_CMAKE_ARGS

View File

@@ -842,7 +842,6 @@ void RemoteVstPlugin::initEditor()
#endif
#else
XEvent e;
Atom prop_atom, val_atom;
if (m_display == nullptr)
@@ -2301,7 +2300,7 @@ void RemoteVstPlugin::guiEventLoop()
{
XNextEvent(m_display, &e);
if (e.type == ClientMessage && e.xclient.data.l[0] == m_wmDeleteMessage)
if (e.type == ClientMessage && static_cast<Atom>(e.xclient.data.l[0]) == m_wmDeleteMessage)
{
hideEditor();
}

View File

@@ -1,4 +1,9 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.13)
if(POLICY "CMP0092")
cmake_policy(SET CMP0092 NEW) # MSVC warning flags are not in CMAKE_<LANG>_FLAGS by default.
endif()
project(RemoteVstPlugin
LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
@@ -22,6 +27,9 @@ FOREACH( OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES} )
SET("CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG}" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
ENDFOREACH()
# Add warning and error flags
include(ErrorFlags)
# Import of windows.h breaks min()/max()
add_definitions(-DNOMINMAX)