Globally ignore attribute warnings on Wine side

These started happening after Wine 5.12, and it doesn't look like it's
going to change.
This commit is contained in:
Robbert van der Helm
2022-09-05 16:22:36 +02:00
parent 6098ebc778
commit 9cea175f2a
6 changed files with 5 additions and 30 deletions
+4
View File
@@ -66,6 +66,10 @@ chainloader_compiler_options = [
# definitions, so we'll try to exclude those bits # definitions, so we'll try to exclude those bits
wine_compiler_options = [ wine_compiler_options = [
'-DNOMINMAX', '-DNOMINMAX',
# Since Wine 5.12 any use of attributes (like visibility specifiers, or
# calling conventions) in templated member or variable types causes a warning
'-Wno-attributes',
'-Wno-ignored-attributes',
# Winsock conflicts with the Posix sockets API. Before Wine 6.8 there was a # Winsock conflicts with the Posix sockets API. Before Wine 6.8 there was a
# `WINE_NOWINSOCK` that would exclude just `winsock.h` from `windows.h`, but # `WINE_NOWINSOCK` that would exclude just `winsock.h` from `windows.h`, but
# they got rid of that so we now need to explicitly define the ifdef guards # they got rid of that so we now need to explicitly define the ifdef guards
-12
View File
@@ -110,17 +110,11 @@ struct ClapPluginInstance {
*/ */
std::optional<Editor> editor; std::optional<Editor> editor;
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
/** /**
* The plugin object. The plugin gets destroyed together with this struct. * The plugin object. The plugin gets destroyed together with this struct.
*/ */
std::unique_ptr<const clap_plugin, decltype(clap_plugin::destroy)> plugin; std::unique_ptr<const clap_plugin, decltype(clap_plugin::destroy)> plugin;
#pragma GCC diagnostic pop
/** /**
* Contains the plugin's supported extensions. Initialized after the host * Contains the plugin's supported extensions. Initialized after the host
* calls `clap_plugin::init()`. * calls `clap_plugin::init()`.
@@ -357,18 +351,12 @@ class ClapBridge : public HostBridge {
*/ */
Configuration config_; Configuration config_;
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
/** /**
* The shared library handle of the CLAP plugin. * The shared library handle of the CLAP plugin.
*/ */
std::unique_ptr<std::remove_pointer_t<HMODULE>, decltype(&FreeLibrary)> std::unique_ptr<std::remove_pointer_t<HMODULE>, decltype(&FreeLibrary)>
plugin_handle_; plugin_handle_;
#pragma GCC diagnostic pop
/** /**
* The windows CLAP plugin's entry point. Initialized in the constructor, * The windows CLAP plugin's entry point. Initialized in the constructor,
* and deinitialized again when the entry point gets dropped. * and deinitialized again when the entry point gets dropped.
-6
View File
@@ -183,18 +183,12 @@ class Vst2Bridge : public HostBridge {
*/ */
ScopedValueCache<int> process_level_cache_; ScopedValueCache<int> process_level_cache_;
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
/** /**
* The shared library handle of the VST2 plugin. * The shared library handle of the VST2 plugin.
*/ */
std::unique_ptr<std::remove_pointer_t<HMODULE>, decltype(&FreeLibrary)> std::unique_ptr<std::remove_pointer_t<HMODULE>, decltype(&FreeLibrary)>
plugin_handle_; plugin_handle_;
#pragma GCC diagnostic pop
/** /**
* The loaded plugin's `AEffect` struct, obtained using the above library * The loaded plugin's `AEffect` struct, obtained using the above library
* handle. * handle.
-6
View File
@@ -113,18 +113,12 @@ class Win32Thread {
Win32Thread& operator=(Win32Thread&&) noexcept; Win32Thread& operator=(Win32Thread&&) noexcept;
private: private:
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
/** /**
* The handle for the thread that is running, will be a null pointer if this * The handle for the thread that is running, will be a null pointer if this
* class was constructed with the default constructor. * class was constructed with the default constructor.
*/ */
std::unique_ptr<std::remove_pointer_t<HANDLE>, decltype(&CloseHandle)> std::unique_ptr<std::remove_pointer_t<HANDLE>, decltype(&CloseHandle)>
handle_; handle_;
#pragma GCC diagnostic pop
}; };
/** /**
-3
View File
@@ -240,12 +240,9 @@ class WineXdndProxy {
*/ */
X11Window proxy_window_; X11Window proxy_window_;
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
std::unique_ptr<std::remove_pointer_t<HWINEVENTHOOK>, std::unique_ptr<std::remove_pointer_t<HWINEVENTHOOK>,
std::decay_t<decltype(&UnhookWinEvent)>> std::decay_t<decltype(&UnhookWinEvent)>>
hook_handle_; hook_handle_;
#pragma GCC diagnostic pop
/** /**
* MT-PowerDrumkit for some reason initializes a drag-and-drop operation, * MT-PowerDrumkit for some reason initializes a drag-and-drop operation,
+1 -3
View File
@@ -1,5 +1,3 @@
project('clap', 'cpp', version : '1.1.1') project('clap', 'cpp', version : '1.1.1')
# Without the `is_system` we'd get warnings about `CLAP_EXPORT` on `clap_entry` clap_dep = declare_dependency(include_directories : include_directories('include'))
# not doing anything.
clap_dep = declare_dependency(include_directories : include_directories('include', is_system : true))