Only ignore -Wmaybe-uninitialized on GCC

An ifdef sounds like a better approach than ignoring two additional
warnings.
This commit is contained in:
Robbert van der Helm
2021-07-14 17:18:44 +02:00
parent f292158889
commit 0c816b0046
2 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -278,9 +278,9 @@ void WineXdndProxy::end_xdnd() {
// Oh and Clang doesn't know about -Wmaybe-uninitialized, so we need to
// ignore some more warnings here to get clangd to not complain
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma clang diagnostic ignored "-Wunknown-warning-option"
#if defined(__GNUC__) && !defined(__llvm__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
void WineXdndProxy::run_xdnd_loop() {
const HWND windows_desktop_window = GetDesktopWindow();
@@ -656,9 +656,9 @@ std::optional<xcb_window_t> WineXdndProxy::get_xdnd_proxy(
// FIXME: See above for more context, spurious warning is generated by passing
// `*last_xdnd_window` to this function
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma clang diagnostic ignored "-Wunknown-warning-option"
#if defined(__GNUC__) && !defined(__llvm__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
void WineXdndProxy::send_xdnd_message(xcb_window_t window,