From 5db843ead6cbf683c2888da377d5d0e0d0d30833 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 27 Jan 2023 10:52:53 +0100 Subject: [PATCH] Remove unused rfb/util.h includes These files don't use anything from this header, so remove the include. This exposes some missing includes in other places, though. So add an explicit include in the files that were relying on an indirect inclusion. --- common/rfb/CMsgHandler.cxx | 1 + common/rfb/CMsgReader.cxx | 1 + common/rfb/CSecurityRSAAES.cxx | 1 + common/rfb/CSecurityTLS.cxx | 1 + common/rfb/CSecurityVncAuth.cxx | 1 - common/rfb/ComparingUpdateTracker.cxx | 2 ++ common/rfb/DecodeManager.cxx | 2 +- common/rfb/EncodeManager.cxx | 1 + common/rfb/InputHandler.h | 1 - common/rfb/Logger.cxx | 1 - common/rfb/Logger_syslog.cxx | 1 - common/rfb/PixelBuffer.h | 1 - common/rfb/PixelFormat.cxx | 1 - common/rfb/SConnection.cxx | 1 + common/rfb/SMsgHandler.cxx | 1 + common/rfb/SMsgReader.cxx | 1 + common/rfb/SSecurityPlain.cxx | 1 + common/rfb/ServerCore.cxx | 1 - common/rfb/ServerCore.h | 1 - common/rfb/VNCSConnectionST.cxx | 1 + common/rfb/encodings.cxx | 1 - vncviewer/DesktopWindow.cxx | 1 + vncviewer/Viewport.cxx | 1 + win/rfb_win32/AboutDialog.h | 1 - win/rfb_win32/SDisplayCorePolling.cxx | 1 - win/vncconfig/Connections.h | 1 + win/vncconfig/Legacy.cxx | 1 + win/winvnc/VNCServerService.cxx | 1 + win/winvnc/winvnc.cxx | 1 + 29 files changed, 19 insertions(+), 12 deletions(-) diff --git a/common/rfb/CMsgHandler.cxx b/common/rfb/CMsgHandler.cxx index f547f0a9..e37811f9 100644 --- a/common/rfb/CMsgHandler.cxx +++ b/common/rfb/CMsgHandler.cxx @@ -28,6 +28,7 @@ #include #include #include +#include static rfb::LogWriter vlog("CMsgHandler"); diff --git a/common/rfb/CMsgReader.cxx b/common/rfb/CMsgReader.cxx index 0052d35e..be5133cf 100644 --- a/common/rfb/CMsgReader.cxx +++ b/common/rfb/CMsgReader.cxx @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/common/rfb/CSecurityRSAAES.cxx b/common/rfb/CSecurityRSAAES.cxx index bff088ad..6194caab 100644 --- a/common/rfb/CSecurityRSAAES.cxx +++ b/common/rfb/CSecurityRSAAES.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx index 58794e89..e24f9d71 100644 --- a/common/rfb/CSecurityTLS.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/common/rfb/CSecurityVncAuth.cxx b/common/rfb/CSecurityVncAuth.cxx index 875e088a..f6a5e07a 100644 --- a/common/rfb/CSecurityVncAuth.cxx +++ b/common/rfb/CSecurityVncAuth.cxx @@ -30,7 +30,6 @@ #include #include -#include #include extern "C" { #include diff --git a/common/rfb/ComparingUpdateTracker.cxx b/common/rfb/ComparingUpdateTracker.cxx index c8d69b78..1bad487e 100644 --- a/common/rfb/ComparingUpdateTracker.cxx +++ b/common/rfb/ComparingUpdateTracker.cxx @@ -26,6 +26,8 @@ #include #include +#include + #include using namespace rfb; diff --git a/common/rfb/DecodeManager.cxx b/common/rfb/DecodeManager.cxx index b6dd81f4..e39a3943 100644 --- a/common/rfb/DecodeManager.cxx +++ b/common/rfb/DecodeManager.cxx @@ -28,8 +28,8 @@ #include #include #include - #include +#include #include #include diff --git a/common/rfb/EncodeManager.cxx b/common/rfb/EncodeManager.cxx index e2571cab..cade1506 100644 --- a/common/rfb/EncodeManager.cxx +++ b/common/rfb/EncodeManager.cxx @@ -33,6 +33,7 @@ #include #include #include +#include #include #include diff --git a/common/rfb/InputHandler.h b/common/rfb/InputHandler.h index fbb69a56..ad6c4be5 100644 --- a/common/rfb/InputHandler.h +++ b/common/rfb/InputHandler.h @@ -26,7 +26,6 @@ #include #include -#include namespace rfb { diff --git a/common/rfb/Logger.cxx b/common/rfb/Logger.cxx index e815dad4..7e0895e4 100644 --- a/common/rfb/Logger.cxx +++ b/common/rfb/Logger.cxx @@ -28,7 +28,6 @@ #include #include -#include using namespace rfb; diff --git a/common/rfb/Logger_syslog.cxx b/common/rfb/Logger_syslog.cxx index 0f5c8423..320ab4b0 100644 --- a/common/rfb/Logger_syslog.cxx +++ b/common/rfb/Logger_syslog.cxx @@ -26,7 +26,6 @@ #include #include -#include #include #include diff --git a/common/rfb/PixelBuffer.h b/common/rfb/PixelBuffer.h index 05273699..528f55c6 100644 --- a/common/rfb/PixelBuffer.h +++ b/common/rfb/PixelBuffer.h @@ -28,7 +28,6 @@ #include #include #include -#include namespace rfb { diff --git a/common/rfb/PixelFormat.cxx b/common/rfb/PixelFormat.cxx index 938ffb5b..b3ea8182 100644 --- a/common/rfb/PixelFormat.cxx +++ b/common/rfb/PixelFormat.cxx @@ -30,7 +30,6 @@ #include #include #include -#include #ifdef _WIN32 #define strcasecmp _stricmp diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index a1755cb4..b6c20923 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -36,6 +36,7 @@ #include #include #include +#include #include diff --git a/common/rfb/SMsgHandler.cxx b/common/rfb/SMsgHandler.cxx index 092d9f7e..4ecfc2b2 100644 --- a/common/rfb/SMsgHandler.cxx +++ b/common/rfb/SMsgHandler.cxx @@ -27,6 +27,7 @@ #include #include #include +#include using namespace rfb; diff --git a/common/rfb/SMsgReader.cxx b/common/rfb/SMsgReader.cxx index 28841704..8cd8d147 100644 --- a/common/rfb/SMsgReader.cxx +++ b/common/rfb/SMsgReader.cxx @@ -36,6 +36,7 @@ #include #include #include +#include using namespace rfb; diff --git a/common/rfb/SSecurityPlain.cxx b/common/rfb/SSecurityPlain.cxx index 5124a08e..e65b6d3b 100644 --- a/common/rfb/SSecurityPlain.cxx +++ b/common/rfb/SSecurityPlain.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #if !defined(WIN32) && !defined(__APPLE__) #include diff --git a/common/rfb/ServerCore.cxx b/common/rfb/ServerCore.cxx index 274458fa..5bb6b9c9 100644 --- a/common/rfb/ServerCore.cxx +++ b/common/rfb/ServerCore.cxx @@ -26,7 +26,6 @@ #endif #include -#include #include rfb::IntParameter rfb::Server::idleTimeout diff --git a/common/rfb/ServerCore.h b/common/rfb/ServerCore.h index 20a740a8..69cad39f 100644 --- a/common/rfb/ServerCore.h +++ b/common/rfb/ServerCore.h @@ -25,7 +25,6 @@ #define __RFB_SERVER_CORE_H__ #include -#include namespace rfb { diff --git a/common/rfb/VNCSConnectionST.cxx b/common/rfb/VNCSConnectionST.cxx index 1d890c28..b5e5b583 100644 --- a/common/rfb/VNCSConnectionST.cxx +++ b/common/rfb/VNCSConnectionST.cxx @@ -40,6 +40,7 @@ #define XK_MISCELLANY #define XK_XKB_KEYS #include +#include using namespace rfb; diff --git a/common/rfb/encodings.cxx b/common/rfb/encodings.cxx index b33dc6df..4acb569e 100644 --- a/common/rfb/encodings.cxx +++ b/common/rfb/encodings.cxx @@ -22,7 +22,6 @@ #include #include -#include int rfb::encodingNum(const char* name) { diff --git a/vncviewer/DesktopWindow.cxx b/vncviewer/DesktopWindow.cxx index 318e9f4e..c5952094 100644 --- a/vncviewer/DesktopWindow.cxx +++ b/vncviewer/DesktopWindow.cxx @@ -30,6 +30,7 @@ #include #include +#include #include "DesktopWindow.h" #include "OptionsDialog.h" diff --git a/vncviewer/Viewport.cxx b/vncviewer/Viewport.cxx index 66903c5f..c501764a 100644 --- a/vncviewer/Viewport.cxx +++ b/vncviewer/Viewport.cxx @@ -29,6 +29,7 @@ #include #include #include +#include // FLTK can pull in the X11 headers on some systems #ifndef XK_VoidSymbol diff --git a/win/rfb_win32/AboutDialog.h b/win/rfb_win32/AboutDialog.h index 0dd9d494..705d6b3c 100644 --- a/win/rfb_win32/AboutDialog.h +++ b/win/rfb_win32/AboutDialog.h @@ -22,7 +22,6 @@ #define __RFB_WIN32_ABOUT_DIALOG_H__ #include -#include extern const char* buildTime; diff --git a/win/rfb_win32/SDisplayCorePolling.cxx b/win/rfb_win32/SDisplayCorePolling.cxx index ae033511..bd8883e6 100644 --- a/win/rfb_win32/SDisplayCorePolling.cxx +++ b/win/rfb_win32/SDisplayCorePolling.cxx @@ -24,7 +24,6 @@ #include #include -#include using namespace rfb; using namespace rfb::win32; diff --git a/win/vncconfig/Connections.h b/win/vncconfig/Connections.h index 888fd77b..fcaae203 100644 --- a/win/vncconfig/Connections.h +++ b/win/vncconfig/Connections.h @@ -25,6 +25,7 @@ #include #include #include +#include #include static rfb::IntParameter port_number("PortNumber", diff --git a/win/vncconfig/Legacy.cxx b/win/vncconfig/Legacy.cxx index 7703c3a3..3a22bb52 100644 --- a/win/vncconfig/Legacy.cxx +++ b/win/vncconfig/Legacy.cxx @@ -19,6 +19,7 @@ #include #include +#include #include using namespace rfb; diff --git a/win/winvnc/VNCServerService.cxx b/win/winvnc/VNCServerService.cxx index 4754d720..09a0707b 100644 --- a/win/winvnc/VNCServerService.cxx +++ b/win/winvnc/VNCServerService.cxx @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/win/winvnc/winvnc.cxx b/win/winvnc/winvnc.cxx index 604df12e..51246407 100644 --- a/win/winvnc/winvnc.cxx +++ b/win/winvnc/winvnc.cxx @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include -- 2.39.5