From 0b3ae8ce5a1e2f24fa00ea604b7b816af104613c Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 13:34:50 -0500 Subject: [PATCH 01/12] Some cleanup --- cpp/include/Ice/Config.h | 2 ++ cpp/src/Ice/Buffer.cpp | 4 ---- cpp/src/Ice/ConnectRequestHandler.cpp | 4 ---- cpp/src/Ice/ConnectionFactory.cpp | 4 +--- cpp/src/Ice/ConnectionI.cpp | 1 - cpp/src/Ice/ConsoleUtil.cpp | 1 - cpp/src/Ice/DefaultsAndOverrides.cpp | 1 - cpp/src/Ice/DynamicLibrary.cpp | 3 --- cpp/src/Ice/Endian.h | 2 ++ cpp/src/Ice/EndpointFactoryManager.cpp | 2 -- cpp/src/Ice/EventHandler.cpp | 1 - cpp/src/Ice/Exception.cpp | 1 - cpp/src/Ice/FileUtil.cpp | 4 +--- cpp/src/Ice/FixedRequestHandler.cpp | 3 --- cpp/src/Ice/HttpParser.cpp | 1 - cpp/src/Ice/IPEndpointI.cpp | 1 - cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp | 1 - cpp/src/Ice/Initialize.cpp | 1 - cpp/src/Ice/InputStream.cpp | 5 ----- cpp/src/Ice/Instance.cpp | 3 --- cpp/src/Ice/InstrumentationI.cpp | 1 - cpp/src/Ice/LocalExceptions.cpp | 3 --- cpp/src/Ice/LoggerAdminI.cpp | 1 - cpp/src/Ice/LoggerI.cpp | 1 - cpp/src/Ice/LoggerUtil.cpp | 1 - cpp/src/Ice/MetricsAdminI.cpp | 4 +--- cpp/src/Ice/Network.cpp | 3 --- cpp/src/Ice/Options.cpp | 1 - cpp/src/Ice/SSL/RFC2253.cpp | 1 - cpp/src/Ice/SSL/SSLAcceptorI.cpp | 2 -- cpp/src/Ice/SSL/SSLConnectorI.cpp | 8 -------- cpp/src/Ice/SSL/SSLEndpointI.cpp | 7 ------- cpp/src/Ice/SSL/SSLEngine.cpp | 3 --- cpp/src/Ice/SSL/SSLException.cpp | 2 -- cpp/src/Ice/SSL/SSLUtil.cpp | 8 +------- cpp/src/Ice/SSL/SecureTransportEngine.cpp | 4 ---- cpp/src/Ice/SSL/SecureTransportUtil.cpp | 4 ---- cpp/src/Ice/SSL/TrustManager.cpp | 3 --- cpp/src/Ice/StringConverter.cpp | 1 - cpp/src/Ice/WSTransceiver.cpp | 2 -- cpp/src/Slice/FileTracker.h | 3 ++- cpp/src/Slice/SliceUtil.cpp | 2 -- cpp/src/Slice/StringLiteralUtil.cpp | 1 - cpp/src/slice2cpp/Gen.cpp | 2 +- cpp/src/slice2swift/SwiftUtil.cpp | 1 - 45 files changed, 11 insertions(+), 103 deletions(-) diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h index b18a3fa8c39..9d3504a15bc 100644 --- a/cpp/include/Ice/Config.h +++ b/cpp/include/Ice/Config.h @@ -5,6 +5,8 @@ #ifndef ICE_CONFIG_H #define ICE_CONFIG_H +// IWYU pragma: keep + // Compiler extensions to export and import symbols: see the documentation for Visual Studio, Clang and GCC. #if defined(_MSC_VER) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) diff --git a/cpp/src/Ice/Buffer.cpp b/cpp/src/Ice/Buffer.cpp index a168c6b514a..b1e8266b8ae 100644 --- a/cpp/src/Ice/Buffer.cpp +++ b/cpp/src/Ice/Buffer.cpp @@ -3,12 +3,8 @@ // #include "Ice/Buffer.h" -#include "Ice/LocalExceptions.h" - -#include using namespace std; -using namespace Ice; using namespace IceInternal; IceInternal::Buffer::Container::Container() noexcept diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index 513e18a6ce4..7fc1795a827 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -5,11 +5,7 @@ #include "ConnectRequestHandler.h" #include "ConnectionI.h" #include "Ice/OutgoingAsync.h" -#include "Ice/Properties.h" -#include "Ice/Proxy.h" -#include "Instance.h" #include "RouterInfo.h" -#include "ThreadPool.h" using namespace std; using namespace IceInternal; diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 552bb04195b..3f020ffaa8b 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -14,9 +14,7 @@ #include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Instance.h" -#include "ObjectAdapterI.h" // For getThreadPool(). -#include "Random.h" -#include "Reference.h" +#include "ObjectAdapterI.h" // For getThreadPool() #include "RouterInfo.h" #include "ThreadPool.h" #include "TraceLevels.h" diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index c07900d286b..18c3e77a65a 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -5,7 +5,6 @@ #include "ConnectionI.h" #include "BatchRequestQueue.h" #include "CheckIdentity.h" -#include "DefaultsAndOverrides.h" #include "DisableWarnings.h" #include "Endian.h" #include "EndpointI.h" diff --git a/cpp/src/Ice/ConsoleUtil.cpp b/cpp/src/Ice/ConsoleUtil.cpp index 651a00127dc..53193293152 100644 --- a/cpp/src/Ice/ConsoleUtil.cpp +++ b/cpp/src/Ice/ConsoleUtil.cpp @@ -9,7 +9,6 @@ #endif #include -#include using namespace IceInternal; using namespace std; diff --git a/cpp/src/Ice/DefaultsAndOverrides.cpp b/cpp/src/Ice/DefaultsAndOverrides.cpp index 5e1f0b1ad5e..9a68e8b93b7 100644 --- a/cpp/src/Ice/DefaultsAndOverrides.cpp +++ b/cpp/src/Ice/DefaultsAndOverrides.cpp @@ -4,7 +4,6 @@ #include "DefaultsAndOverrides.h" #include "Ice/LocalExceptions.h" -#include "Ice/LoggerUtil.h" #include "Ice/Properties.h" using namespace std; diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 290151848d3..7ad196e05c5 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -3,8 +3,6 @@ // #include "DynamicLibrary.h" -#include "Ice/StringConverter.h" -#include "Ice/StringUtil.h" #include #include @@ -13,7 +11,6 @@ # include #endif -using namespace Ice; using namespace IceInternal; using namespace std; diff --git a/cpp/src/Ice/Endian.h b/cpp/src/Ice/Endian.h index a7a12cb3772..2a7ccfd7f46 100644 --- a/cpp/src/Ice/Endian.h +++ b/cpp/src/Ice/Endian.h @@ -5,6 +5,8 @@ #ifndef ICE_ENDIAN_H #define ICE_ENDIAN_H +// IWYU pragma: keep + #if __has_include() # include #endif diff --git a/cpp/src/Ice/EndpointFactoryManager.cpp b/cpp/src/Ice/EndpointFactoryManager.cpp index 4a42b738166..757457b1d43 100644 --- a/cpp/src/Ice/EndpointFactoryManager.cpp +++ b/cpp/src/Ice/EndpointFactoryManager.cpp @@ -4,11 +4,9 @@ #include "EndpointFactoryManager.h" #include "DefaultsAndOverrides.h" -#include "Ice/Endpoint.h" #include "Ice/InputStream.h" #include "Ice/LocalExceptions.h" #include "Ice/OutputStream.h" -#include "Ice/Properties.h" #include "Ice/StringUtil.h" #include "Instance.h" #include "OpaqueEndpointI.h" diff --git a/cpp/src/Ice/EventHandler.cpp b/cpp/src/Ice/EventHandler.cpp index 3dcfbd12428..f311dd787c9 100644 --- a/cpp/src/Ice/EventHandler.cpp +++ b/cpp/src/Ice/EventHandler.cpp @@ -3,7 +3,6 @@ // #include "EventHandler.h" -#include "Instance.h" using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index aa032ad1603..4571a4a546c 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -21,7 +21,6 @@ #include "Ice/Exception.h" #include "Ice/Config.h" #include "Ice/Demangle.h" -#include "Ice/StringUtil.h" #ifdef _WIN32 # include diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index 2a546ff5d41..525fbae8906 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -4,12 +4,10 @@ #include "FileUtil.h" #include "DisableWarnings.h" -#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include -#include #include -#include +#include #ifdef _WIN32 # include diff --git a/cpp/src/Ice/FixedRequestHandler.cpp b/cpp/src/Ice/FixedRequestHandler.cpp index f729a13a415..20e44bfe0f6 100644 --- a/cpp/src/Ice/FixedRequestHandler.cpp +++ b/cpp/src/Ice/FixedRequestHandler.cpp @@ -5,9 +5,6 @@ #include "FixedRequestHandler.h" #include "ConnectionI.h" #include "Ice/OutgoingAsync.h" -#include "Ice/Proxy.h" -#include "Reference.h" -#include "RouterInfo.h" using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/HttpParser.cpp b/cpp/src/Ice/HttpParser.cpp index da3de74d551..c79129ec24b 100644 --- a/cpp/src/Ice/HttpParser.cpp +++ b/cpp/src/Ice/HttpParser.cpp @@ -4,7 +4,6 @@ #include "HttpParser.h" #include "Ice/Config.h" -#include "Ice/LocalExceptions.h" #include "Ice/StringUtil.h" #include diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp index bc4ccc30b5f..7e196938eea 100644 --- a/cpp/src/Ice/IPEndpointI.cpp +++ b/cpp/src/Ice/IPEndpointI.cpp @@ -6,7 +6,6 @@ #include "HashUtil.h" #include "Ice/InputStream.h" #include "Ice/LocalExceptions.h" -#include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Instance.h" #include "NetworkProxy.h" diff --git a/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp b/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp index 28352c032b9..fe92b90b62f 100644 --- a/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp +++ b/cpp/src/Ice/IdleTimeoutTransceiverDecorator.cpp @@ -3,7 +3,6 @@ // #include "IdleTimeoutTransceiverDecorator.h" -#include "Ice/Buffer.h" #include diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 3b8e1c0a37b..9ddfec3def5 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -8,7 +8,6 @@ #include "Ice/Communicator.h" #include "Ice/LocalExceptions.h" #include "Ice/Properties.h" -#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include "Instance.h" #include "LoggerI.h" diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp index a4ecc5d0262..dd3be63014d 100644 --- a/cpp/src/Ice/InputStream.cpp +++ b/cpp/src/Ice/InputStream.cpp @@ -8,9 +8,6 @@ #include "Endian.h" #include "Ice/FactoryTable.h" #include "Ice/LocalExceptions.h" -#include "Ice/LoggerUtil.h" -#include "Ice/Object.h" -#include "Ice/Proxy.h" #include "Ice/SlicedData.h" #include "Ice/StringConverter.h" #include "Ice/UserExceptionFactory.h" @@ -20,8 +17,6 @@ #include "TraceLevels.h" #include "TraceUtil.h" -#include - using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index d4ba3054b5e..3655338445c 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -18,7 +18,6 @@ #include "Ice/LoggerUtil.h" #include "Ice/ObserverHelper.h" #include "Ice/Properties.h" -#include "Ice/ProxyFunctions.h" #include "Ice/Router.h" #include "Ice/StringUtil.h" #include "Ice/UUID.h" @@ -30,7 +29,6 @@ #include "ObjectAdapterFactory.h" #include "PluginManagerI.h" #include "PropertiesAdminI.h" -#include "ProtocolInstance.h" #include "ReferenceFactory.h" #include "RegisterPluginsInit.h" #include "RetryQueue.h" @@ -40,7 +38,6 @@ #include "TimeUtil.h" #include "TraceLevels.h" #include "ValueFactoryManagerI.h" -#include "WSEndpoint.h" #include #include diff --git a/cpp/src/Ice/InstrumentationI.cpp b/cpp/src/Ice/InstrumentationI.cpp index 0ee8050df82..2dd233cf4e6 100644 --- a/cpp/src/Ice/InstrumentationI.cpp +++ b/cpp/src/Ice/InstrumentationI.cpp @@ -7,7 +7,6 @@ #include "Ice/Communicator.h" #include "Ice/Connection.h" #include "Ice/Endpoint.h" -#include "Ice/LocalExceptions.h" #include "Ice/LoggerUtil.h" #include "Ice/ObjectAdapter.h" #include "Ice/VersionFunctions.h" diff --git a/cpp/src/Ice/LocalExceptions.cpp b/cpp/src/Ice/LocalExceptions.cpp index 8648cb20e28..9d51b4a0e3e 100644 --- a/cpp/src/Ice/LocalExceptions.cpp +++ b/cpp/src/Ice/LocalExceptions.cpp @@ -3,14 +3,11 @@ // #include "Ice/LocalExceptions.h" -#include "Ice/Initialize.h" #include "Ice/Proxy.h" #include "Ice/StringUtil.h" #include "Network.h" #include "RequestFailedMessage.h" -#include - using namespace std; using namespace Ice; using namespace IceInternal; diff --git a/cpp/src/Ice/LoggerAdminI.cpp b/cpp/src/Ice/LoggerAdminI.cpp index 464e1e03123..473ab47f4fe 100644 --- a/cpp/src/Ice/LoggerAdminI.cpp +++ b/cpp/src/Ice/LoggerAdminI.cpp @@ -4,7 +4,6 @@ #include "LoggerAdminI.h" #include "Ice/Communicator.h" -#include "Ice/Connection.h" #include "Ice/Initialize.h" #include "Ice/LocalExceptions.h" #include "Ice/LoggerUtil.h" diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp index 02229c9bdfe..9be4c937caf 100644 --- a/cpp/src/Ice/LoggerI.cpp +++ b/cpp/src/Ice/LoggerI.cpp @@ -3,7 +3,6 @@ // #include "LoggerI.h" -#include "ConsoleUtil.h" #include "FileUtil.h" #include "Ice/LocalExceptions.h" #include "Ice/StringUtil.h" diff --git a/cpp/src/Ice/LoggerUtil.cpp b/cpp/src/Ice/LoggerUtil.cpp index b836fc9d9c0..623e4630d99 100644 --- a/cpp/src/Ice/LoggerUtil.cpp +++ b/cpp/src/Ice/LoggerUtil.cpp @@ -6,7 +6,6 @@ #include "Ice/LoggerUtil.h" #include "Ice/LocalExceptions.h" #include "Ice/Logger.h" -#include "Ice/Plugin.h" #include "Instance.h" using namespace std; diff --git a/cpp/src/Ice/MetricsAdminI.cpp b/cpp/src/Ice/MetricsAdminI.cpp index dcfc3c3e36d..e1f58a8a846 100644 --- a/cpp/src/Ice/MetricsAdminI.cpp +++ b/cpp/src/Ice/MetricsAdminI.cpp @@ -3,13 +3,11 @@ // #include "Ice/MetricsAdminI.h" -#include "Ice/Communicator.h" #include "Ice/Logger.h" #include "Ice/LoggerUtil.h" +#include "Ice/MetricsObserverI.h" #include "Ice/Properties.h" #include "Ice/StringUtil.h" -#include "Instance.h" -#include "InstrumentationI.h" #include #include diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 798cbccbe74..5f0eafe3e56 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -3,11 +3,9 @@ // #include "Network.h" -#include "Ice/Buffer.h" #include "Ice/LocalExceptions.h" #include "Ice/LoggerUtil.h" // For setTcpBufSize #include "Ice/Properties.h" // For setTcpBufSize -#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include "NetworkProxy.h" #include "ProtocolInstance.h" // For setTcpBufSize @@ -16,7 +14,6 @@ #include "DisableWarnings.h" #include -#include // TODO: fix this warning #if defined(_MSC_VER) diff --git a/cpp/src/Ice/Options.cpp b/cpp/src/Ice/Options.cpp index 990e16e8743..c1118f46e81 100644 --- a/cpp/src/Ice/Options.cpp +++ b/cpp/src/Ice/Options.cpp @@ -6,7 +6,6 @@ #include "Ice/StringUtil.h" #include -#include #include #include diff --git a/cpp/src/Ice/SSL/RFC2253.cpp b/cpp/src/Ice/SSL/RFC2253.cpp index 2a0350ec9ee..983a0b6092a 100644 --- a/cpp/src/Ice/SSL/RFC2253.cpp +++ b/cpp/src/Ice/SSL/RFC2253.cpp @@ -4,7 +4,6 @@ #include "RFC2253.h" #include "Ice/LocalExceptions.h" -#include "Ice/SSL/SSLException.h" #include "Ice/StringUtil.h" #include diff --git a/cpp/src/Ice/SSL/SSLAcceptorI.cpp b/cpp/src/Ice/SSL/SSLAcceptorI.cpp index 1b43bee5a91..47bbc78af00 100644 --- a/cpp/src/Ice/SSL/SSLAcceptorI.cpp +++ b/cpp/src/Ice/SSL/SSLAcceptorI.cpp @@ -3,11 +3,9 @@ // #include "SSLAcceptorI.h" -#include "Ice/LocalExceptions.h" #include "SSLEndpointI.h" #include "SSLEngine.h" #include "SSLInstance.h" -#include "SSLUtil.h" #if defined(_WIN32) # include "SchannelEngine.h" diff --git a/cpp/src/Ice/SSL/SSLConnectorI.cpp b/cpp/src/Ice/SSL/SSLConnectorI.cpp index e468c00f9f9..d1668349f6c 100644 --- a/cpp/src/Ice/SSL/SSLConnectorI.cpp +++ b/cpp/src/Ice/SSL/SSLConnectorI.cpp @@ -3,23 +3,15 @@ // #include "SSLConnectorI.h" -#include "../NetworkProxy.h" -#include "../StreamSocket.h" -#include "Ice/Communicator.h" -#include "Ice/LocalExceptions.h" -#include "Ice/LoggerUtil.h" #include "Ice/SSL/ClientAuthenticationOptions.h" -#include "SSLEndpointI.h" #include "SSLEngine.h" #include "SSLInstance.h" -#include "SSLUtil.h" #if defined(ICE_USE_SCHANNEL) # include "SchannelEngine.h" # include "SchannelTransceiverI.h" using namespace Ice::SSL::Schannel; #elif defined(ICE_USE_SECURE_TRANSPORT) -# include "SecureTransportEngine.h" # include "SecureTransportTransceiverI.h" using namespace Ice::SSL::SecureTransport; #elif defined(ICE_USE_OPENSSL) diff --git a/cpp/src/Ice/SSL/SSLEndpointI.cpp b/cpp/src/Ice/SSL/SSLEndpointI.cpp index ca55daada05..3c3ec562376 100644 --- a/cpp/src/Ice/SSL/SSLEndpointI.cpp +++ b/cpp/src/Ice/SSL/SSLEndpointI.cpp @@ -3,14 +3,7 @@ // #include "SSLEndpointI.h" -#include "../DefaultsAndOverrides.h" -#include "../EndpointFactoryManager.h" -#include "../HashUtil.h" #include "Ice/Comparable.h" -#include "Ice/InputStream.h" -#include "Ice/LocalExceptions.h" -#include "Ice/Object.h" -#include "Ice/OutputStream.h" #include "SSLAcceptorI.h" #include "SSLConnectorI.h" #include "SSLInstance.h" diff --git a/cpp/src/Ice/SSL/SSLEngine.cpp b/cpp/src/Ice/SSL/SSLEngine.cpp index 19f781417ef..4996f02d31f 100644 --- a/cpp/src/Ice/SSL/SSLEngine.cpp +++ b/cpp/src/Ice/SSL/SSLEngine.cpp @@ -4,13 +4,10 @@ #include "SSLEngine.h" #include "../Instance.h" -#include "Ice/Communicator.h" #include "Ice/LocalExceptions.h" #include "Ice/Logger.h" -#include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Ice/SSL/ConnectionInfo.h" -#include "Ice/StringUtil.h" #include "TrustManager.h" #include diff --git a/cpp/src/Ice/SSL/SSLException.cpp b/cpp/src/Ice/SSL/SSLException.cpp index b02c0d4394c..3d18e74ed32 100644 --- a/cpp/src/Ice/SSL/SSLException.cpp +++ b/cpp/src/Ice/SSL/SSLException.cpp @@ -4,8 +4,6 @@ #include "Ice/SSL/SSLException.h" -#include - using namespace std; using namespace Ice::SSL; diff --git a/cpp/src/Ice/SSL/SSLUtil.cpp b/cpp/src/Ice/SSL/SSLUtil.cpp index 1632e68d1e7..751d671f868 100644 --- a/cpp/src/Ice/SSL/SSLUtil.cpp +++ b/cpp/src/Ice/SSL/SSLUtil.cpp @@ -3,19 +3,13 @@ // #include "SSLUtil.h" -#include "../Base64.h" #include "../FileUtil.h" -#include "../Network.h" -#include "../UniqueRef.h" -#include "DistinguishedName.h" #include "Ice/Config.h" -#include "Ice/LocalExceptions.h" #include "Ice/SSL/SSLException.h" -#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" -#include "RFC2253.h" #include +#include using namespace std; using namespace Ice; diff --git a/cpp/src/Ice/SSL/SecureTransportEngine.cpp b/cpp/src/Ice/SSL/SecureTransportEngine.cpp index 752cd3f7fb6..46abe67a9b1 100644 --- a/cpp/src/Ice/SSL/SecureTransportEngine.cpp +++ b/cpp/src/Ice/SSL/SecureTransportEngine.cpp @@ -9,14 +9,10 @@ #include "Ice/Config.h" #include "Ice/LocalExceptions.h" #include "Ice/Logger.h" -#include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Ice/SSL/SSLException.h" -#include "Ice/StringUtil.h" #include "SSLEngine.h" #include "SSLUtil.h" -#include "SecureTransportEngineF.h" -#include "SecureTransportTransceiverI.h" #include "SecureTransportUtil.h" // Disable deprecation warnings from SecureTransport APIs diff --git a/cpp/src/Ice/SSL/SecureTransportUtil.cpp b/cpp/src/Ice/SSL/SecureTransportUtil.cpp index c39ede2665c..f5b7f054c28 100644 --- a/cpp/src/Ice/SSL/SecureTransportUtil.cpp +++ b/cpp/src/Ice/SSL/SecureTransportUtil.cpp @@ -3,7 +3,6 @@ // #include "SecureTransportUtil.h" -#include "../Base64.h" #include "../FileUtil.h" #include "../UniqueRef.h" #include "DistinguishedName.h" @@ -14,9 +13,6 @@ #include #include -#include -#include - using namespace Ice; using namespace IceInternal; using namespace Ice::SSL; diff --git a/cpp/src/Ice/SSL/TrustManager.cpp b/cpp/src/Ice/SSL/TrustManager.cpp index fe73b18d1c1..a3ea484db63 100644 --- a/cpp/src/Ice/SSL/TrustManager.cpp +++ b/cpp/src/Ice/SSL/TrustManager.cpp @@ -4,10 +4,7 @@ #include "TrustManager.h" #include "../Instance.h" -#include "../Network.h" -#include "Ice/Communicator.h" #include "Ice/LocalExceptions.h" -#include "Ice/Logger.h" #include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Ice/SSL/ConnectionInfo.h" diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp index f4cceff0d7f..063b200d5f1 100644 --- a/cpp/src/Ice/StringConverter.cpp +++ b/cpp/src/Ice/StringConverter.cpp @@ -11,7 +11,6 @@ #endif #include "Ice/StringConverter.h" -#include "Ice/StringUtil.h" #ifdef _WIN32 # include diff --git a/cpp/src/Ice/WSTransceiver.cpp b/cpp/src/Ice/WSTransceiver.cpp index 4fefd20534a..3fad4ab7b67 100644 --- a/cpp/src/Ice/WSTransceiver.cpp +++ b/cpp/src/Ice/WSTransceiver.cpp @@ -7,9 +7,7 @@ #include "Endian.h" #include "HttpParser.h" #include "Ice/Buffer.h" -#include "Ice/Communicator.h" #include "Ice/Connection.h" -#include "Ice/Endpoint.h" #include "Ice/LocalExceptions.h" #include "Ice/LoggerUtil.h" #include "Ice/SHA1.h" diff --git a/cpp/src/Slice/FileTracker.h b/cpp/src/Slice/FileTracker.h index f427ecc50bf..e5924ee9dd5 100644 --- a/cpp/src/Slice/FileTracker.h +++ b/cpp/src/Slice/FileTracker.h @@ -4,7 +4,8 @@ #define FILE_TRACKER_H #include "Ice/LocalException.h" -#include "Parser.h" +#include +#include namespace Slice { diff --git a/cpp/src/Slice/SliceUtil.cpp b/cpp/src/Slice/SliceUtil.cpp index 74735849386..12306dbd8af 100644 --- a/cpp/src/Slice/SliceUtil.cpp +++ b/cpp/src/Slice/SliceUtil.cpp @@ -3,12 +3,10 @@ #include "../Ice/ConsoleUtil.h" #include "../Ice/FileUtil.h" #include "FileTracker.h" -#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include "Util.h" #include #include -#include #include #ifndef _MSC_VER diff --git a/cpp/src/Slice/StringLiteralUtil.cpp b/cpp/src/Slice/StringLiteralUtil.cpp index 820e77cacf2..6d034fdbdd2 100644 --- a/cpp/src/Slice/StringLiteralUtil.cpp +++ b/cpp/src/Slice/StringLiteralUtil.cpp @@ -6,7 +6,6 @@ #include #include -#include using namespace std; using namespace Slice; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 053fbca7b6d..0ca60e315c5 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include using namespace std; using namespace Slice; diff --git a/cpp/src/slice2swift/SwiftUtil.cpp b/cpp/src/slice2swift/SwiftUtil.cpp index a6c8c3f2fbd..588a35e588c 100644 --- a/cpp/src/slice2swift/SwiftUtil.cpp +++ b/cpp/src/slice2swift/SwiftUtil.cpp @@ -6,7 +6,6 @@ #include "SwiftUtil.h" #include "../Ice/OutputUtil.h" #include "../Slice/Util.h" -#include "Ice/StringUtil.h" #include From d7bcb279bfe9ff8facffb0b0b06439746746894f Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 13:42:42 -0500 Subject: [PATCH 02/12] fixes --- cpp/src/Ice/FileUtil.cpp | 1 + cpp/src/Slice/SliceUtil.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index 525fbae8906..4cf45ae485d 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -6,6 +6,7 @@ #include "DisableWarnings.h" #include "Ice/StringUtil.h" #include +#include #include #include diff --git a/cpp/src/Slice/SliceUtil.cpp b/cpp/src/Slice/SliceUtil.cpp index 12306dbd8af..380fbe5a160 100644 --- a/cpp/src/Slice/SliceUtil.cpp +++ b/cpp/src/Slice/SliceUtil.cpp @@ -7,6 +7,7 @@ #include "Util.h" #include #include +#include #include #ifndef _MSC_VER From 7a95e601d0f21df137b54f4a72896d6c8acc36ac Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:17:42 -0500 Subject: [PATCH 03/12] fixes --- cpp/src/Ice/SSL/SSLUtil.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/Ice/SSL/SSLUtil.cpp b/cpp/src/Ice/SSL/SSLUtil.cpp index 751d671f868..d23cc677868 100644 --- a/cpp/src/Ice/SSL/SSLUtil.cpp +++ b/cpp/src/Ice/SSL/SSLUtil.cpp @@ -3,13 +3,17 @@ // #include "SSLUtil.h" +#include "../Base64.h" #include "../FileUtil.h" +#include "../Network.h" +#include "../UniqueRef.h" +#include "DistinguishedName.h" #include "Ice/Config.h" #include "Ice/SSL/SSLException.h" #include "Ice/StringUtil.h" +#include "RFC2253.h" #include -#include using namespace std; using namespace Ice; From 6cc0a0345581fcc572b3ffbae716f3705d16299d Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:26:49 -0500 Subject: [PATCH 04/12] fixes --- cpp/include/Ice/Config.h | 2 -- cpp/src/Ice/Buffer.cpp | 3 +++ cpp/src/Ice/Endian.h | 2 -- cpp/src/Ice/FileUtil.cpp | 1 + cpp/src/Ice/IPEndpointI.cpp | 1 - cpp/src/Slice/FileTracker.h | 1 + 6 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cpp/include/Ice/Config.h b/cpp/include/Ice/Config.h index 9d3504a15bc..b18a3fa8c39 100644 --- a/cpp/include/Ice/Config.h +++ b/cpp/include/Ice/Config.h @@ -5,8 +5,6 @@ #ifndef ICE_CONFIG_H #define ICE_CONFIG_H -// IWYU pragma: keep - // Compiler extensions to export and import symbols: see the documentation for Visual Studio, Clang and GCC. #if defined(_MSC_VER) # define ICE_DECLSPEC_EXPORT __declspec(dllexport) diff --git a/cpp/src/Ice/Buffer.cpp b/cpp/src/Ice/Buffer.cpp index b1e8266b8ae..8b8d0dcf8c0 100644 --- a/cpp/src/Ice/Buffer.cpp +++ b/cpp/src/Ice/Buffer.cpp @@ -4,6 +4,9 @@ #include "Ice/Buffer.h" +#include +#include + using namespace std; using namespace IceInternal; diff --git a/cpp/src/Ice/Endian.h b/cpp/src/Ice/Endian.h index 2a7ccfd7f46..a7a12cb3772 100644 --- a/cpp/src/Ice/Endian.h +++ b/cpp/src/Ice/Endian.h @@ -5,8 +5,6 @@ #ifndef ICE_ENDIAN_H #define ICE_ENDIAN_H -// IWYU pragma: keep - #if __has_include() # include #endif diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index 4cf45ae485d..eead433b3fa 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -5,6 +5,7 @@ #include "FileUtil.h" #include "DisableWarnings.h" #include "Ice/StringUtil.h" + #include #include #include diff --git a/cpp/src/Ice/IPEndpointI.cpp b/cpp/src/Ice/IPEndpointI.cpp index 7e196938eea..182cc591992 100644 --- a/cpp/src/Ice/IPEndpointI.cpp +++ b/cpp/src/Ice/IPEndpointI.cpp @@ -6,7 +6,6 @@ #include "HashUtil.h" #include "Ice/InputStream.h" #include "Ice/LocalExceptions.h" -#include "Ice/Properties.h" #include "Instance.h" #include "NetworkProxy.h" #include "ProtocolInstance.h" diff --git a/cpp/src/Slice/FileTracker.h b/cpp/src/Slice/FileTracker.h index e5924ee9dd5..708d2367f9d 100644 --- a/cpp/src/Slice/FileTracker.h +++ b/cpp/src/Slice/FileTracker.h @@ -4,6 +4,7 @@ #define FILE_TRACKER_H #include "Ice/LocalException.h" + #include #include From 42041abe70f89ad02f9bd4463aa598427e9bb960 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:27:26 -0500 Subject: [PATCH 05/12] Remove ICE_SWIFT --- cpp/src/Ice/SSL/SSLUtil.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpp/src/Ice/SSL/SSLUtil.cpp b/cpp/src/Ice/SSL/SSLUtil.cpp index d23cc677868..75f2b0ed269 100644 --- a/cpp/src/Ice/SSL/SSLUtil.cpp +++ b/cpp/src/Ice/SSL/SSLUtil.cpp @@ -98,7 +98,7 @@ Ice::SSL::readFile(const string& file, vector& buffer) optional Ice::SSL::resolveFilePath(const string& path, const string& parentDir) { -#if defined(ICE_USE_SECURE_TRANSPORT_IOS) || defined(ICE_SWIFT) +#if defined(ICE_USE_SECURE_TRANSPORT_IOS) CFBundleRef bundle = CFBundleGetMainBundle(); if (bundle) { @@ -149,7 +149,7 @@ Ice::SSL::resolveFilePath(const string& path, const string& parentDir) optional Ice::SSL::resolveDirPath(const string& path, const string& parentDir) { -#if defined(ICE_USE_SECURE_TRANSPORT_IOS) || defined(ICE_SWIFT) +#if defined(ICE_USE_SECURE_TRANSPORT_IOS) CFBundleRef bundle = CFBundleGetMainBundle(); if (bundle) { From 133ab35d32b1f9d25917dc1bedb92fb5424967df Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:48:05 -0500 Subject: [PATCH 06/12] fixes --- cpp/src/Ice/ConsoleUtil.cpp | 1 + cpp/src/Ice/FileUtil.cpp | 2 ++ cpp/src/Ice/StringConverter.cpp | 2 ++ 3 files changed, 5 insertions(+) diff --git a/cpp/src/Ice/ConsoleUtil.cpp b/cpp/src/Ice/ConsoleUtil.cpp index 53193293152..3c92ad81f9d 100644 --- a/cpp/src/Ice/ConsoleUtil.cpp +++ b/cpp/src/Ice/ConsoleUtil.cpp @@ -5,6 +5,7 @@ #include "ConsoleUtil.h" #ifdef _WIN32 +# include # include #endif diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index eead433b3fa..ac09f4d3f69 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -12,9 +12,11 @@ #include #ifdef _WIN32 +# include "Ice/StringConverter.h" # include # include # include + #else # include # include diff --git a/cpp/src/Ice/StringConverter.cpp b/cpp/src/Ice/StringConverter.cpp index 063b200d5f1..991a58dbda5 100644 --- a/cpp/src/Ice/StringConverter.cpp +++ b/cpp/src/Ice/StringConverter.cpp @@ -13,6 +13,8 @@ #include "Ice/StringConverter.h" #ifdef _WIN32 +# include "Ice/StringUtil.h" + # include #endif From 28d8298b24f8c219069e6734b7408cbfcb725a56 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:54:37 -0500 Subject: [PATCH 07/12] fixes --- cpp/src/Ice/DynamicLibrary.cpp | 2 ++ cpp/src/Ice/Exception.cpp | 1 + cpp/src/Ice/FileUtil.cpp | 2 +- cpp/src/Ice/LoggerI.cpp | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 7ad196e05c5..560deb98c93 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -3,6 +3,8 @@ // #include "DynamicLibrary.h" +#include "Ice/StringConverter.h" +#include "Ice/StringUtil.h" #include #include diff --git a/cpp/src/Ice/Exception.cpp b/cpp/src/Ice/Exception.cpp index 4571a4a546c..aa032ad1603 100644 --- a/cpp/src/Ice/Exception.cpp +++ b/cpp/src/Ice/Exception.cpp @@ -21,6 +21,7 @@ #include "Ice/Exception.h" #include "Ice/Config.h" #include "Ice/Demangle.h" +#include "Ice/StringUtil.h" #ifdef _WIN32 # include diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index ac09f4d3f69..8ea9abdab6a 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -5,6 +5,7 @@ #include "FileUtil.h" #include "DisableWarnings.h" #include "Ice/StringUtil.h" +#include "Ice/StringUtil.h" #include #include @@ -12,7 +13,6 @@ #include #ifdef _WIN32 -# include "Ice/StringConverter.h" # include # include # include diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp index 9be4c937caf..cd220dbaa68 100644 --- a/cpp/src/Ice/LoggerI.cpp +++ b/cpp/src/Ice/LoggerI.cpp @@ -5,6 +5,7 @@ #include "LoggerI.h" #include "FileUtil.h" #include "Ice/LocalExceptions.h" +#include "Ice/LoggerUtil.h" #include "Ice/StringUtil.h" #include "TimeUtil.h" From 69a2307fc1d7ac2968c34a9c2d61f65a5527f110 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:55:27 -0500 Subject: [PATCH 08/12] fixes --- cpp/src/Ice/FileUtil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index 8ea9abdab6a..3d583126b45 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -4,7 +4,7 @@ #include "FileUtil.h" #include "DisableWarnings.h" -#include "Ice/StringUtil.h" +#include "Ice/StringConverter.h" #include "Ice/StringUtil.h" #include From 68470dade5c9838abd434ab924fae73d35b5a31c Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 14:58:49 -0500 Subject: [PATCH 09/12] fixes --- cpp/src/Ice/DynamicLibrary.cpp | 1 + cpp/src/Ice/LoggerI.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp index 560deb98c93..290151848d3 100644 --- a/cpp/src/Ice/DynamicLibrary.cpp +++ b/cpp/src/Ice/DynamicLibrary.cpp @@ -13,6 +13,7 @@ # include #endif +using namespace Ice; using namespace IceInternal; using namespace std; diff --git a/cpp/src/Ice/LoggerI.cpp b/cpp/src/Ice/LoggerI.cpp index cd220dbaa68..02229c9bdfe 100644 --- a/cpp/src/Ice/LoggerI.cpp +++ b/cpp/src/Ice/LoggerI.cpp @@ -3,9 +3,9 @@ // #include "LoggerI.h" +#include "ConsoleUtil.h" #include "FileUtil.h" #include "Ice/LocalExceptions.h" -#include "Ice/LoggerUtil.h" #include "Ice/StringUtil.h" #include "TimeUtil.h" From 9fcc653bae3fb1110087c15b6c0b4ea421204313 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 15:15:21 -0500 Subject: [PATCH 10/12] Clang format --- cpp/src/Ice/ConnectionI.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 7509022fa51..fe714de492d 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1479,7 +1479,8 @@ Ice::ConnectionI::message(ThreadPoolCurrent& current) connectionStartCompleted = std::move(connectionStartCompleted), sentCBs = std::move(sentCBs), messageUpcall = std::move(messageUpcall), - stream]() { + stream]() + { self->upcall( std::move(connectionStartCompleted), std::move(sentCBs), From 8d5f640cba69a8c82d84eaaa172f1ae96ba4397e Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 20:26:47 -0500 Subject: [PATCH 11/12] Add back Base64.h --- cpp/src/Ice/SSL/SecureTransportUtil.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cpp/src/Ice/SSL/SecureTransportUtil.cpp b/cpp/src/Ice/SSL/SecureTransportUtil.cpp index f5b7f054c28..cd5299d2a8c 100644 --- a/cpp/src/Ice/SSL/SecureTransportUtil.cpp +++ b/cpp/src/Ice/SSL/SecureTransportUtil.cpp @@ -3,6 +3,7 @@ // #include "SecureTransportUtil.h" +#include "../Base64.h" #include "../FileUtil.h" #include "../UniqueRef.h" #include "DistinguishedName.h" From b1ecb4a1dec48dbd334b34c590c93667bb5d6bd1 Mon Sep 17 00:00:00 2001 From: Joe George Date: Mon, 13 Jan 2025 20:28:10 -0500 Subject: [PATCH 12/12] cleanup --- cpp/src/Ice/ConnectionFactory.cpp | 2 +- cpp/src/Ice/FileUtil.cpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/cpp/src/Ice/ConnectionFactory.cpp b/cpp/src/Ice/ConnectionFactory.cpp index 3f020ffaa8b..d10d33a7e4d 100644 --- a/cpp/src/Ice/ConnectionFactory.cpp +++ b/cpp/src/Ice/ConnectionFactory.cpp @@ -14,7 +14,7 @@ #include "Ice/LoggerUtil.h" #include "Ice/Properties.h" #include "Instance.h" -#include "ObjectAdapterI.h" // For getThreadPool() +#include "ObjectAdapterI.h" #include "RouterInfo.h" #include "ThreadPool.h" #include "TraceLevels.h" diff --git a/cpp/src/Ice/FileUtil.cpp b/cpp/src/Ice/FileUtil.cpp index 5c32a0ee002..5aac4d6e7ec 100644 --- a/cpp/src/Ice/FileUtil.cpp +++ b/cpp/src/Ice/FileUtil.cpp @@ -17,7 +17,6 @@ # include # include # include - #else # include # include