diff options
author | Pierre Ossman <ossman@cendio.se> | 2024-04-03 12:38:04 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2024-06-24 13:42:54 +0200 |
commit | ceb60ad3d53c8bd3d9388d231f8054851d6f6a56 (patch) | |
tree | 303bbd4697724c302d46db4412fecba2257451ec | |
parent | 139f0e8a4b81fe3dcd9476ec5ee16ea5e74af901 (diff) | |
download | tigervnc-ceb60ad3d53c8bd3d9388d231f8054851d6f6a56.tar.gz tigervnc-ceb60ad3d53c8bd3d9388d231f8054851d6f6a56.zip |
Disable gcc NULL warning for context menu
We use the pointer to just store an identifier for the menu, but this is
enough for gcc to think we are using 0 instead of nullptr and complain.
Even an explicit cast isn't enough to silence it here for some reason.
-rw-r--r-- | vncviewer/Viewport.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index bbccc2f9..0c2cb862 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -1222,6 +1222,9 @@ void Viewport::resolveAltGrDetection(bool isAltGrSequence) } #endif +// FIXME: gcc confuses ID_DISCONNECT with NULL +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant" void Viewport::initContextMenu() { contextMenu->clear(); @@ -1268,7 +1271,7 @@ void Viewport::initContextMenu() fltk_menu_add(contextMenu, p_("ContextMenu|", "About &TigerVNC viewer..."), 0, nullptr, (void*)ID_ABOUT, 0); } - +#pragma GCC diagnostic pop void Viewport::popupContextMenu() { |