Silence warnings on decltype() with Wine 5.22

There were already similar warnings on 32-bit winegcc, but now it also
happens on the 64-bit version. Instead of adding
`-Wno-ignored-attributes` we'll just sprinkle some warning ignores here
and there to prevent any other surprises.
This commit is contained in:
Robbert van der Helm
2020-11-29 13:18:15 +01:00
parent cbf276b7dc
commit e08162fabf
5 changed files with 24 additions and 9 deletions
+2 -9
View File
@@ -200,14 +200,7 @@ if with_bitbridge
wine_threads_dep,
xcb_dep
],
# FIXME: 32-bit winegcc defines `__stdcall` differently than the 64-bit
# version, and one of the changes is the inclusion of
# `__atribute__((__force_align_arg_pointer__))`. For whetever reason
# this causes GCC to complain when using function pointers with the
# `__stdcall` calling convention in template arguments, although it
# otherwise works just fine. We don't ignore any warnings in the
# regular host application so this should not cause any issues!
cpp_args : compiler_options + ['-m32', '-Wno-ignored-attributes'],
cpp_args : compiler_options + ['-m32'],
link_args : ['-m32']
)
@@ -225,7 +218,7 @@ if with_bitbridge
wine_threads_dep,
xcb_dep
],
cpp_args : compiler_options + ['-m32', '-Wno-ignored-attributes'],
cpp_args : compiler_options + ['-m32'],
link_args : ['-m32']
)
endif
+6
View File
@@ -153,6 +153,10 @@ class Vst2Bridge {
*/
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 VST plugin. I sadly could not get
* Boost.DLL to work here, so we'll just load the VST plugisn by hand.
@@ -160,6 +164,8 @@ class Vst2Bridge {
std::unique_ptr<std::remove_pointer_t<HMODULE>, decltype(&FreeLibrary)>
plugin_handle;
#pragma GCC diagnostic pop
/**
* The loaded plugin's `AEffect` struct, obtained using the above library
* handle.
+4
View File
@@ -170,6 +170,9 @@ Editor::Editor(const Configuration& config,
ShowWindow(win32_handle.get(), SW_SHOWNORMAL);
if (config.editor_double_embed) {
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
// As explained above, we can't do this directly in the initializer list
win32_child_handle = std::unique_ptr<std::remove_pointer_t<HWND>,
decltype(&DestroyWindow)>(
@@ -179,6 +182,7 @@ Editor::Editor(const Configuration& config,
client_area.width, client_area.height, win32_handle.get(),
nullptr, GetModuleHandle(nullptr), this),
DestroyWindow);
#pragma GCC diagnostic pop
ShowWindow(win32_child_handle->get(), SW_SHOWNORMAL);
}
+6
View File
@@ -197,6 +197,10 @@ class Editor {
*/
const WindowClass window_class;
// FIXME: This emits `-Wignored-attributes` as of Wine 5.22
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wignored-attributes"
/**
* The handle for the window created through Wine that the plugin uses to
* embed itself in.
@@ -216,6 +220,8 @@ class Editor {
std::unique_ptr<std::remove_pointer_t<HWND>, decltype(&DestroyWindow)>>
win32_child_handle;
#pragma GCC diagnostic pop
/**
* The Win32 API will block the `DispatchMessage` call when opening e.g. a
* dropdown, but it will still allow timers to be run so the GUI can still
+6
View File
@@ -181,12 +181,18 @@ class Win32Thread {
Win32Thread& operator=(Win32Thread&&);
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
* class was constructed with the default constructor.
*/
std::unique_ptr<std::remove_pointer_t<HANDLE>, decltype(&CloseHandle)>
handle;
#pragma GCC diagnostic pop
};
/**