From 4d4759c8a045de721af5ada24fe937d69894718c Mon Sep 17 00:00:00 2001 From: Matt Millett Date: Sat, 3 Feb 2024 15:08:45 -0500 Subject: [PATCH] Maintainence for AIX and Solaris --- groups/nts/ntsa/ntsa_localname.t.cpp | 7 +++---- groups/nts/ntsf/ntsf_system.t.cpp | 2 +- groups/nts/ntsu/ntsu_socketoptionutil.t.cpp | 12 ++++++------ groups/nts/ntsu/ntsu_socketutil.cpp | 15 +++++++-------- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/groups/nts/ntsa/ntsa_localname.t.cpp b/groups/nts/ntsa/ntsa_localname.t.cpp index 00f80283..f049b1af 100644 --- a/groups/nts/ntsa/ntsa_localname.t.cpp +++ b/groups/nts/ntsa/ntsa_localname.t.cpp @@ -250,7 +250,7 @@ NTSCFG_TEST_CASE(4) ntsa::LocalName localName; NTSCFG_TEST_OK(localName.setAbstract()); NTSCFG_TEST_ERROR(localName.setValue(ss.str()), - ntsa::Error(ntsa::Error::Code::e_LIMIT)); + ntsa::Error::Code::e_LIMIT); } { ntsa::LocalName localName; @@ -262,7 +262,7 @@ NTSCFG_TEST_CASE(4) ntsa::LocalName localName; NTSCFG_TEST_OK(localName.setValue(ss.str())); NTSCFG_TEST_ERROR(localName.setAbstract(), - ntsa::Error(ntsa::Error::Code::e_LIMIT)); + ntsa::Error::Code::e_LIMIT); } #endif @@ -358,8 +358,7 @@ NTSCFG_TEST_CASE(5) NTSCFG_TEST_TRUE(false); } #endif - ntsa::Error::Code code = ntsa::Error::e_LIMIT; - NTSCFG_TEST_ERROR(error, ntsa::Error(code)); + NTSCFG_TEST_ERROR(error, ntsa::Error::e_LIMIT); } } diff --git a/groups/nts/ntsf/ntsf_system.t.cpp b/groups/nts/ntsf/ntsf_system.t.cpp index 5a1df060..8a1a076e 100644 --- a/groups/nts/ntsf/ntsf_system.t.cpp +++ b/groups/nts/ntsf/ntsf_system.t.cpp @@ -191,7 +191,7 @@ NTSCFG_TEST_CASE(1) // this test case is simply verifying that this combination of // parameters is not portable. - NTSCFG_TEST_ERROR(error, ntsa::Error(ntsa::Error::e_ADDRESS_IN_USE)); + NTSCFG_TEST_ERROR(error, ntsa::Error::e_ADDRESS_IN_USE); #endif diff --git a/groups/nts/ntsu/ntsu_socketoptionutil.t.cpp b/groups/nts/ntsu/ntsu_socketoptionutil.t.cpp index 3c79bcc0..d9f29cc4 100644 --- a/groups/nts/ntsu/ntsu_socketoptionutil.t.cpp +++ b/groups/nts/ntsu/ntsu_socketoptionutil.t.cpp @@ -1663,34 +1663,34 @@ NTSCFG_TEST_CASE(5) error = ntsu::SocketOptionUtil::getTimestampIncomingData( ×tampIncomingData, socket); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); NTSCFG_TEST_FALSE(timestampIncomingData); error = ntsu::SocketOptionUtil::getTimestampOutgoingData( ×tampOutgoingData, socket); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); NTSCFG_TEST_FALSE(timestampOutgoingData); error = ntsu::SocketOptionUtil::setTimestampIncomingData( socket, false); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); error = ntsu::SocketOptionUtil::setTimestampIncomingData( socket, true); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); error = ntsu::SocketOptionUtil::setTimestampOutgoingData( socket, false); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); error = ntsu::SocketOptionUtil::setTimestampOutgoingData( socket, true); NTSCFG_TEST_ERROR( - error, ntsa::Error(ntsa::Error::e_NOT_IMPLEMENTED)); + error, ntsa::Error::e_NOT_IMPLEMENTED); } if (socket != ntsa::k_INVALID_HANDLE) { diff --git a/groups/nts/ntsu/ntsu_socketutil.cpp b/groups/nts/ntsu/ntsu_socketutil.cpp index 5277a944..ce4b6db9 100644 --- a/groups/nts/ntsu/ntsu_socketutil.cpp +++ b/groups/nts/ntsu/ntsu_socketutil.cpp @@ -554,14 +554,14 @@ class SendControl enum { // The payload size required to send any meta-data (viz. open file // descriptors) to the peer of a socket. - k_SEND_CONTROL_PAYLOAD_SIZE = static_cast( + k_SEND_CONTROL_PAYLOAD_SIZE = NTSU_SOCKETUTIL_MAX_HANDLES_PER_OUTGOING_CONTROLMSG * - sizeof(ntsa::Handle)), + sizeof(ntsa::Handle), // The control buffer capacity required to send any meta-data (viz. // open file descriptors) to the peer of a socket. k_SEND_CONTROL_BUFFER_SIZE = - static_cast(CMSG_SPACE(k_SEND_CONTROL_PAYLOAD_SIZE)) + CMSG_SPACE(k_SEND_CONTROL_PAYLOAD_SIZE) }; // Define a type alias for a maximimally-aligned buffer of suitable size to @@ -596,11 +596,10 @@ class ReceiveControl // file descriptors, timestamps, etc.) buffered by the operating system // for a socket. k_RECEIVE_CONTROL_PAYLOAD_SIZE = - static_cast( - NTSU_SOCKETUTIL_MAX_HANDLES_PER_INCOMING_CONTROLMSG * - sizeof(ntsa::Handle)) + (NTSU_SOCKETUTIL_MAX_HANDLES_PER_INCOMING_CONTROLMSG * + sizeof(ntsa::Handle)) #if defined(BSLS_PLATFORM_OS_LINUX) - + static_cast(sizeof(TimestampUtil::ScmTimestamping)) + + sizeof(TimestampUtil::ScmTimestamping) #endif // The control buffer capacity required to receive any meta-data (e.g. @@ -608,7 +607,7 @@ class ReceiveControl // system for a socket. , k_RECEIVE_CONTROL_BUFFER_SIZE = - static_cast(CMSG_SPACE(k_RECEIVE_CONTROL_PAYLOAD_SIZE)) + CMSG_SPACE(k_RECEIVE_CONTROL_PAYLOAD_SIZE) }; // Define a type alias for a maximimally-aligned buffer of suitable size to