This is an automated email from the ASF dual-hosted git repository.
jbarrett pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-native.git
The following commit(s) were added to refs/heads/develop by this push:
new f098ca6 GEODE-4994: No warngins on GCC (#263)
f098ca6 is described below
commit f098ca6fa11c067579346ea202f792874efe7277
Author: Jacob Barrett <[email protected]>
AuthorDate: Fri Apr 6 09:41:46 2018 -0700
GEODE-4994: No warngins on GCC (#263)
-Wall
-Werror
-Wpedantic
---
CMakeLists.txt | 11 ++-
cppcache/include/geode/CacheableBuiltins.hpp | 68 +++++++--------
cppcache/include/geode/DataOutput.hpp | 2 +-
cppcache/integration-test/BBNamingContext.cpp | 6 +-
cppcache/integration-test/CacheHelper.cpp | 7 --
cppcache/integration-test/fw_dunit.cpp | 4 +-
cppcache/integration-test/fw_dunit.hpp | 2 +-
cppcache/integration-test/fw_spawn.hpp | 2 +-
cppcache/integration-test/testLogger.cpp | 12 +--
cppcache/integration-test/testThinClientCq.cpp | 3 +-
.../testThinClientLRUExpiration.cpp | 15 ++--
.../testThinClientSecurityCQAuthorizationMU.cpp | 22 +----
...tThinClientSecurityDurableCQAuthorizationMU.cpp | 22 +----
.../testXmlCacheCreationWithOverFlow.cpp | 4 +-
.../testXmlCacheCreationWithPools.cpp | 30 ++++---
cppcache/src/CacheableBuiltins.cpp | 16 ++--
cppcache/src/CqEventImpl.cpp | 5 +-
cppcache/src/LocalRegion.cpp | 4 +-
cppcache/src/Log.cpp | 3 +-
cppcache/src/PdxFieldType.cpp | 4 +-
cppcache/src/PdxInstanceImpl.cpp | 4 +-
cppcache/src/SerializationRegistry.cpp | 2 +-
cppcache/src/TcrConnection.cpp | 5 +-
cppcache/src/ThinClientBaseDM.cpp | 2 +-
cppcache/src/ThinClientPoolDM.cpp | 9 +-
cppcache/src/ThinClientRedundancyManager.cpp | 4 +-
cppcache/src/ThinClientRegion.cpp | 14 ++--
cryptoimpl/DHImpl.cpp | 96 ++++++++--------------
dhimpl/DHImpl.cpp | 77 +++++------------
tests/cpp/fwklib/TcpIpc.cpp | 7 +-
tests/cpp/security/Security.cpp | 3 -
tests/cpp/testobject/BatchObject.cpp | 3 +-
tests/cpp/testobject/DeltaFastAssetAccount.hpp | 2 +-
tests/cpp/testobject/DeltaPSTObject.cpp | 8 +-
tests/cpp/testobject/EqStruct.cpp | 2 +-
tests/cpp/testobject/PSTObject.cpp | 2 +-
tests/cpp/testobject/PortfolioPdx.cpp | 4 -
tests/cpp/testobject/PositionPdx.cpp | 1 -
tests/cpp/testobject/VariousPdxTypes.cpp | 5 --
39 files changed, 193 insertions(+), 299 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5778e3..3bee799 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,8 +176,17 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
#TODO look into CMAKE_CXX_STANDARD_LIBRARIES
target_link_libraries(c++11 INTERFACE -std=c++11 stdc++ gcc_s CrunG3 m c)
-elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
+ target_compile_options(_WarningsAsError INTERFACE
+ -Werror
+ -Wall
+ -Wno-unknown-pragmas #TODO fix
+ -Wno-unused-variable #TODO fix
+ -Wpedantic
+ # -Wshadow TODO fix
+ # -Weffc++ TODO fix
+ )
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(_WarningsAsError INTERFACE
diff --git a/cppcache/include/geode/CacheableBuiltins.hpp
b/cppcache/include/geode/CacheableBuiltins.hpp
index fa0fb71..cfbf118 100644
--- a/cppcache/include/geode/CacheableBuiltins.hpp
+++ b/cppcache/include/geode/CacheableBuiltins.hpp
@@ -261,61 +261,61 @@ class APACHE_GEODE_EXPORT CacheableContainerType : public
Cacheable, public TBas
// Instantiations for the built-in CacheableKeys
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(bool, CacheableBoolean);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(bool, CacheableBoolean)
/**
* An immutable wrapper for booleans that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(bool, CacheableBoolean);
+_GEODE_CACHEABLE_KEY_TYPE_(bool, CacheableBoolean)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(int8_t, CacheableByte);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(int8_t, CacheableByte)
/**
* An immutable wrapper for bytes that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(int8_t, CacheableByte);
+_GEODE_CACHEABLE_KEY_TYPE_(int8_t, CacheableByte)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(double, CacheableDouble);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(double, CacheableDouble)
/**
* An immutable wrapper for doubles that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(double, CacheableDouble);
+_GEODE_CACHEABLE_KEY_TYPE_(double, CacheableDouble)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(float, CacheableFloat);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(float, CacheableFloat)
/**
* An immutable wrapper for floats that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(float, CacheableFloat);
+_GEODE_CACHEABLE_KEY_TYPE_(float, CacheableFloat)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(int16_t, CacheableInt16);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(int16_t, CacheableInt16)
/**
* An immutable wrapper for 16-bit integers that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(int16_t, CacheableInt16);
+_GEODE_CACHEABLE_KEY_TYPE_(int16_t, CacheableInt16)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(int32_t, CacheableInt32);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(int32_t, CacheableInt32)
/**
* An immutable wrapper for 32-bit integers that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(int32_t, CacheableInt32);
+_GEODE_CACHEABLE_KEY_TYPE_(int32_t, CacheableInt32)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(int64_t, CacheableInt64);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(int64_t, CacheableInt64)
/**
* An immutable wrapper for 64-bit integers that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(int64_t, CacheableInt64);
+_GEODE_CACHEABLE_KEY_TYPE_(int64_t, CacheableInt64)
-_GEODE_CACHEABLE_KEY_TYPE_DEF_(char16_t, CacheableCharacter);
+_GEODE_CACHEABLE_KEY_TYPE_DEF_(char16_t, CacheableCharacter)
/**
* An immutable wrapper for characters that can serve as
* a distributable key object for caching.
*/
-_GEODE_CACHEABLE_KEY_TYPE_(char16_t, CacheableCharacter);
+_GEODE_CACHEABLE_KEY_TYPE_(char16_t, CacheableCharacter)
// Instantiations for array built-in Cacheables
@@ -448,65 +448,65 @@ using CacheableStringArray =
CacheableArray<std::shared_ptr<CacheableString>,
// Instantiations for container types (Vector/HashMap/HashSet) Cacheables
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableVector);
+ CacheableVector)
/**
* A mutable <code>Cacheable</code> vector wrapper that can serve as
* a distributable object for caching.
*/
_GEODE_CACHEABLE_CONTAINER_TYPE_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableVector);
+ CacheableVector)
-_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable, CacheableHashMap);
+_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable, CacheableHashMap)
/**
* A mutable <code>CacheableKey</code> to <code>Serializable</code>
* hash map that can serve as a distributable object for caching.
*/
-_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableHashMap);
+_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableHashMap)
-_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashSetOfCacheableKey, CacheableHashSet);
+_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashSetOfCacheableKey, CacheableHashSet)
/**
* A mutable <code>CacheableKey</code> hash set wrapper that can serve as
* a distributable object for caching.
*/
-_GEODE_CACHEABLE_CONTAINER_TYPE_(HashSetOfCacheableKey, CacheableHashSet);
+_GEODE_CACHEABLE_CONTAINER_TYPE_(HashSetOfCacheableKey, CacheableHashSet)
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableArrayList);
+ CacheableArrayList)
/**
* A mutable <code>Cacheable</code> array list wrapper that can serve as
* a distributable object for caching.
*/
_GEODE_CACHEABLE_CONTAINER_TYPE_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableArrayList);
+ CacheableArrayList)
// linketlist for JSON formattor issue
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableLinkedList);
+ CacheableLinkedList)
/**
* A mutable <code>Cacheable</code> array list wrapper that can serve as
* a distributable object for caching.
*/
_GEODE_CACHEABLE_CONTAINER_TYPE_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableLinkedList);
+ CacheableLinkedList)
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableStack);
+ CacheableStack)
/**
* A mutable <code>Cacheable</code> stack wrapper that can serve as
* a distributable object for caching.
*/
_GEODE_CACHEABLE_CONTAINER_TYPE_(std::vector<std::shared_ptr<Cacheable>>,
- CacheableStack);
+ CacheableStack)
-_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable, CacheableHashTable);
+_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable, CacheableHashTable)
/**
* A mutable <code>CacheableKey</code> to <code>Serializable</code>
* hash map that can serve as a distributable object for caching.
*/
-_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableHashTable);
+_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableHashTable)
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable,
- CacheableIdentityHashMap);
+ CacheableIdentityHashMap)
/**
* A mutable <code>CacheableKey</code> to <code>Serializable</code>
* hash map that can serve as a distributable object for caching. This is
@@ -514,10 +514,10 @@ _GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashMapOfCacheable,
* to <code>CacheableHashMap</code> i.e. does not provide the semantics of
* java <code>IdentityHashMap</code>.
*/
-_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableIdentityHashMap);
+_GEODE_CACHEABLE_CONTAINER_TYPE_(HashMapOfCacheable, CacheableIdentityHashMap)
_GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashSetOfCacheableKey,
- CacheableLinkedHashSet);
+ CacheableLinkedHashSet)
/**
* A mutable <code>CacheableKey</code> hash set wrapper that can serve as
* a distributable object for caching. This is provided for compability
@@ -525,7 +525,7 @@ _GEODE_CACHEABLE_CONTAINER_TYPE_DEF_(HashSetOfCacheableKey,
* <code>CacheableHashSet</code> i.e. does not provide the predictable
* iteration semantics of java <code>LinkedHashSet</code>.
*/
-_GEODE_CACHEABLE_CONTAINER_TYPE_(HashSetOfCacheableKey,
CacheableLinkedHashSet);
+_GEODE_CACHEABLE_CONTAINER_TYPE_(HashSetOfCacheableKey, CacheableLinkedHashSet)
} // namespace client
} // namespace geode
diff --git a/cppcache/include/geode/DataOutput.hpp
b/cppcache/include/geode/DataOutput.hpp
index 3e0575f..78043ce 100644
--- a/cppcache/include/geode/DataOutput.hpp
+++ b/cppcache/include/geode/DataOutput.hpp
@@ -553,7 +553,7 @@ class APACHE_GEODE_EXPORT DataOutput {
void writeJavaModifiedUtf8(
const std::basic_string<_CharT, _Traits, _Allocator>& value) {
writeJavaModifiedUtf8(value.data(), value.length());
- };
+ }
template <class _Traits, class _Allocator>
void writeJavaModifiedUtf8(
diff --git a/cppcache/integration-test/BBNamingContext.cpp
b/cppcache/integration-test/BBNamingContext.cpp
index 9a6f703..86fb9c7 100644
--- a/cppcache/integration-test/BBNamingContext.cpp
+++ b/cppcache/integration-test/BBNamingContext.cpp
@@ -232,9 +232,9 @@ BBNamingContextServerImpl::BBNamingContextServerImpl() {
m_serv = new BBProcessor(m_shared, m_bbServer);
m_resp = new Responder(m_shared, prt);
m_farm = new Service(3);
- uint32_t thrds = m_farm->runThreaded(m_recv, 1);
- thrds = m_farm->runThreaded(m_serv, 1);
- thrds = m_farm->runThreaded(m_resp, 1);
+ m_farm->runThreaded(m_recv, 1);
+ m_farm->runThreaded(m_serv, 1);
+ m_farm->runThreaded(m_resp, 1);
} catch (FwkException& e) {
FWKEXCEPTION("create bb server encounted Exception: " << e.what());
} catch (...) {
diff --git a/cppcache/integration-test/CacheHelper.cpp
b/cppcache/integration-test/CacheHelper.cpp
index 00edba1..9d11b34 100644
--- a/cppcache/integration-test/CacheHelper.cpp
+++ b/cppcache/integration-test/CacheHelper.cpp
@@ -1530,7 +1530,6 @@ void CacheHelper::closeLocator(int instance, bool) {
char cmd[2048];
char currWDPath[2048];
- int portnum = 0;
std::string currDir = ACE_OS::getcwd(currWDPath, 2048);
std::string keystore = std::string(ACE_OS::getenv("TESTSRC")) + "/keystore";
@@ -1549,21 +1548,15 @@ void CacheHelper::closeLocator(int instance, bool) {
switch (instance) {
case 1:
- // portnum = 34756;
- portnum = CacheHelper::staticLocatorHostPort1;
sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort1);
currDir += tmp; // currDir += "1";
break;
case 2:
- // portnum = 34757;
- portnum = CacheHelper::staticLocatorHostPort2;
sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort2);
currDir += tmp;
// currDir += "2";
break;
case 3:
- // portnum = 34758;
- portnum = CacheHelper::staticLocatorHostPort3;
sprintf(tmp, "%d", CacheHelper::staticLocatorHostPort3);
currDir += tmp;
// currDir += "3";
diff --git a/cppcache/integration-test/fw_dunit.cpp
b/cppcache/integration-test/fw_dunit.cpp
index ae89ebe..5c22d17 100644
--- a/cppcache/integration-test/fw_dunit.cpp
+++ b/cppcache/integration-test/fw_dunit.cpp
@@ -928,7 +928,7 @@ int dmain(int argc, ACE_TCHAR* argv[]) {
/** entry point for test code modules to access the naming service. */
NamingContext* globals() { return DUNIT->globals(); }
-}; // namespace dunit
+} // namespace dunit
namespace perf {
@@ -1172,6 +1172,6 @@ void Semaphore::release(int t) {
}
}
-}; // namespace perf
+} // namespace perf
namespace test {} // namespace test
diff --git a/cppcache/integration-test/fw_dunit.hpp
b/cppcache/integration-test/fw_dunit.hpp
index 37e4266..fc75cc9 100644
--- a/cppcache/integration-test/fw_dunit.hpp
+++ b/cppcache/integration-test/fw_dunit.hpp
@@ -351,7 +351,7 @@ class TestException {
int dmain(int argc, char* argv[]);
-}; // end namespace dunit.
+} // end namespace dunit.
#ifndef __DUNIT_NO_MAIN__
diff --git a/cppcache/integration-test/fw_spawn.hpp
b/cppcache/integration-test/fw_spawn.hpp
index 82708b5..b4d7745 100644
--- a/cppcache/integration-test/fw_spawn.hpp
+++ b/cppcache/integration-test/fw_spawn.hpp
@@ -124,6 +124,6 @@
ACE_TCHAR programName_[2048];
};
-}; // namespace dunit.
+} // namespace dunit.
#endif // GEODE_INTEGRATION_TEST_FW_SPAWN_H_
diff --git a/cppcache/integration-test/testLogger.cpp
b/cppcache/integration-test/testLogger.cpp
index 0edd053..d9cd695 100644
--- a/cppcache/integration-test/testLogger.cpp
+++ b/cppcache/integration-test/testLogger.cpp
@@ -166,7 +166,7 @@ BEGIN_TEST(ALL_LEVEL_MACRO)
int lines = numOfLinesInFile("all_logfile.log");
printf("lines = %d Level = %d, %d\n", lines, static_cast<int>(level),
- Log::logLevel());
+ static_cast<int>(Log::logLevel()));
ASSERT(lines == expected(level), "Wrong number of lines");
Log::close();
@@ -201,13 +201,13 @@ BEGIN_TEST(FILE_LIMIT)
int lines = numOfLinesInFile("logfile.log");
int expectedLines = static_cast<int>(level) + LENGTH_OF_BANNER -
(level >= LogLevel::Default ? 1 : 0);
- printf("lines = %d expectedLines = %d level = %d\n", lines,
expectedLines,
- level);
+ printf("lines = %d expectedLines = %d level = %d\n", lines,
+ expectedLines, static_cast<int>(level));
- ASSERT(lines == expectedLines, "Wrong number of lines");
+ ASSERT(lines == expectedLines, "Wrong number of lines");
- Log::close();
- unlink("logfile.log");
+ Log::close();
+ unlink("logfile.log");
}
#endif
}
diff --git a/cppcache/integration-test/testThinClientCq.cpp
b/cppcache/integration-test/testThinClientCq.cpp
index 0168580..fc1dc83 100644
--- a/cppcache/integration-test/testThinClientCq.cpp
+++ b/cppcache/integration-test/testThinClientCq.cpp
@@ -537,7 +537,8 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
sprintf(buf, "number of listeners for cq[%s] is %zd", cqNames[i],
vl.size());
LOG(buf);
- ASSERT(vl.size() == i + 1, "incorrect number of listeners");
+ ASSERT(vl.size() == static_cast<size_t>(i + 1),
+ "incorrect number of listeners");
if (i == (MAX_LISTNER - 1)) {
MyCqListener* myLl[MAX_LISTNER];
for (int k = 0; k < MAX_LISTNER; k++) {
diff --git a/cppcache/integration-test/testThinClientLRUExpiration.cpp
b/cppcache/integration-test/testThinClientLRUExpiration.cpp
index acfcf91..3e8ee37 100644
--- a/cppcache/integration-test/testThinClientLRUExpiration.cpp
+++ b/cppcache/integration-test/testThinClientLRUExpiration.cpp
@@ -86,11 +86,16 @@ void printAttribute(RegionAttributes attr) {
printf("EntryIdleTimeout: %s\n",
to_string(attr.getEntryIdleTimeout()).c_str());
printf("getLruEntriesLimit: %d\n", attr.getLruEntriesLimit());
- printf("RegionTimeToLiveAction: %d\n", attr.getRegionTimeToLiveAction());
- printf("RegionIdleTimeoutAction: %d\n", attr.getRegionIdleTimeoutAction());
- printf("EntryTimeToLiveAction: %d\n", attr.getEntryTimeToLiveAction());
- printf("EntryIdleTimeoutAction: %d\n", attr.getEntryIdleTimeoutAction());
- printf("LruEvictionAction: %d\n", attr.getLruEvictionAction());
+ printf("RegionTimeToLiveAction: %d\n",
+ static_cast<int>(attr.getRegionTimeToLiveAction()));
+ printf("RegionIdleTimeoutAction: %d\n",
+ static_cast<int>(attr.getRegionIdleTimeoutAction()));
+ printf("EntryTimeToLiveAction: %d\n",
+ static_cast<int>(attr.getEntryTimeToLiveAction()));
+ printf("EntryIdleTimeoutAction: %d\n",
+ static_cast<int>(attr.getEntryIdleTimeoutAction()));
+ printf("LruEvictionAction: %d\n",
+ static_cast<int>(attr.getLruEvictionAction()));
printf("ClientNotification: %s\n",
attr.getClientNotificationEnabled() ? "true" : "false");
// printf("getEndPoint: %s\n",attr.getEndpoints());
diff --git
a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
b/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
index 48ee5f7..249c266 100644
--- a/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
+++ b/cppcache/integration-test/testThinClientSecurityCQAuthorizationMU.cpp
@@ -96,7 +96,7 @@ class MyCqListener : public CqListener {
m_numEvents(0) {}
inline void updateCount(const CqEvent& cqEvent) {
printf(" in cqEvent.getQueryOperation() %d id = %d\n",
- cqEvent.getQueryOperation(), m_id);
+ static_cast<int>(cqEvent.getQueryOperation()), m_id);
printf(" in update key = %s \n",
(dynamic_cast<CacheableString*>(cqEvent.getKey().get()))
->value()
@@ -349,16 +349,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
char buf[1024];
uint8_t i = 0;
- uint32_t inserts[MAX_LISTNER];
- uint32_t updates[MAX_LISTNER];
- uint32_t deletes[MAX_LISTNER];
- uint32_t events[MAX_LISTNER];
- for (i = 0; i < MAX_LISTNER; i++) {
- inserts[i] = 0;
- updates[i] = 0;
- deletes[i] = 0;
- events[i] = 0;
- }
CqAttributesFactory cqFac;
for (i = 0; i < MAX_LISTNER; i++) {
@@ -411,16 +401,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFour2)
char buf[1024];
uint8_t i = 0;
- uint32_t inserts[MAX_LISTNER];
- uint32_t updates[MAX_LISTNER];
- uint32_t deletes[MAX_LISTNER];
- uint32_t events[MAX_LISTNER];
- for (i = 0; i < MAX_LISTNER; i++) {
- inserts[i] = 0;
- updates[i] = 0;
- deletes[i] = 0;
- events[i] = 0;
- }
for (i = 0; i < MAX_LISTNER; i++) {
sprintf(buf, "get info for cq[%s]:", cqNames[i]);
diff --git
a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
b/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
index 73d7901..0c7014b 100644
---
a/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
+++
b/cppcache/integration-test/testThinClientSecurityDurableCQAuthorizationMU.cpp
@@ -96,7 +96,7 @@ class MyCqListener : public CqListener {
m_numEvents(0) {}
inline void updateCount(const CqEvent& cqEvent) {
printf(" in cqEvent.getQueryOperation() %d id = %d\n",
- cqEvent.getQueryOperation(), m_id);
+ static_cast<int>(cqEvent.getQueryOperation()), m_id);
printf(" in update key = %s \n",
(dynamic_cast<CacheableString*>(cqEvent.getKey().get()))
->value()
@@ -392,16 +392,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFour)
char buf[1024];
uint8_t i = 0;
- uint32_t inserts[MAX_LISTNER];
- uint32_t updates[MAX_LISTNER];
- uint32_t deletes[MAX_LISTNER];
- uint32_t events[MAX_LISTNER];
- for (i = 0; i < MAX_LISTNER; i++) {
- inserts[i] = 0;
- updates[i] = 0;
- deletes[i] = 0;
- events[i] = 0;
- }
for (i = 0; i < MAX_LISTNER; i++) {
sprintf(buf, "get info for cq[%s]:", cqNames[i]);
@@ -447,16 +437,6 @@ DUNIT_TASK_DEFINITION(CLIENT1, StepFour2)
char buf[1024];
uint8_t i = 0;
- uint32_t inserts[MAX_LISTNER];
- uint32_t updates[MAX_LISTNER];
- uint32_t deletes[MAX_LISTNER];
- uint32_t events[MAX_LISTNER];
- for (i = 0; i < MAX_LISTNER; i++) {
- inserts[i] = 0;
- updates[i] = 0;
- deletes[i] = 0;
- events[i] = 0;
- }
for (i = 0; i < MAX_LISTNER; i++) {
sprintf(buf, "get info for cq[%s]:", cqNames[i]);
diff --git a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
index 6bc03fe..02646e6 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithOverFlow.cpp
@@ -85,7 +85,7 @@ int testXmlCacheCreationWithOverflow() {
}
std::cout << "Root regions in Cache :" << std::endl;
- for (int32_t i = 0; i < vrp.size(); i++) {
+ for (size_t i = 0; i < vrp.size(); i++) {
std::cout << "vc[" << i << "].m_reaPtr=" << vrp.at(i).get() << std::endl;
std::cout << "vc[" << i << "]=" << vrp.at(i)->getName() << std::endl;
}
@@ -104,7 +104,7 @@ int testXmlCacheCreationWithOverflow() {
std::cout << "get subregions from the root region :" << vrp.at(0)->getName()
<< std::endl;
- for (int32_t i = 0; i < vr.size(); i++) {
+ for (size_t i = 0; i < vr.size(); i++) {
std::cout << "vc[" << i << "].m_reaPtr=" << vr.at(i).get() << std::endl;
std::cout << "vc[" << i << "]=" << vr.at(i)->getName() << std::endl;
}
diff --git a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
index 112e491..d4f64c0 100644
--- a/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
+++ b/cppcache/integration-test/testXmlCacheCreationWithPools.cpp
@@ -18,6 +18,7 @@
#include <string>
#include <iostream>
#include <vector>
+#include <cstdint>
#include "fw_dunit.hpp"
@@ -112,7 +113,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
pool->getFreeConnectionTimeout()) {
sprintf(logmsg,
"checkPoolAttribs: Pool freeConnectionTimeout expected [%d], "
- "actual [%lld]",
+ "actual [%" PRId64 "]",
freeConnectionTimeout, pool->getFreeConnectionTimeout().count());
LOG(logmsg);
return false;
@@ -121,7 +122,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
pool->getLoadConditioningInterval()) {
sprintf(logmsg,
"checkPoolAttribs: Pool loadConditioningInterval expected [%d], "
- "actual [%lld]",
+ "actual [%" PRId64 "]",
loadConditioningInterval,
pool->getLoadConditioningInterval().count());
LOG(logmsg);
@@ -157,15 +158,18 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
return false;
}
if (std::chrono::milliseconds(pingInterval) != pool->getPingInterval()) {
- sprintf(logmsg,
- "checkPoolAttribs: Pool pingInterval expected [%d], actual [%lld]",
- pingInterval, pool->getPingInterval().count());
+ sprintf(
+ logmsg,
+ "checkPoolAttribs: Pool pingInterval expected [%d], actual [%" PRId64
+ "]",
+ pingInterval, pool->getPingInterval().count());
LOG(logmsg);
return false;
}
if (std::chrono::milliseconds(readTimeout) != pool->getReadTimeout()) {
sprintf(logmsg,
- "checkPoolAttribs: Pool readTimeout expected [%d], actual [%lld]",
+ "checkPoolAttribs: Pool readTimeout expected [%d], actual [%"
PRId64
+ "]",
readTimeout, pool->getReadTimeout().count());
LOG(logmsg);
return false;
@@ -198,7 +202,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
pool->getSubscriptionMessageTrackingTimeout()) {
sprintf(logmsg,
"checkPoolAttribs: Pool subscriptionMessageTrackingTimeout "
- "expected [%d], actual [%lld]",
+ "expected [%d], actual [%" PRId64 "]",
subscriptionMessageTrackingTimeout,
pool->getSubscriptionMessageTrackingTimeout().count());
LOG(logmsg);
@@ -208,7 +212,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
pool->getSubscriptionAckInterval()) {
sprintf(logmsg,
"checkPoolAttribs: Pool subscriptionAckInterval expected [%d], "
- "actual [%lld]",
+ "actual [%" PRId64 "]",
subscriptionAckInterval,
pool->getSubscriptionAckInterval().count());
LOG(logmsg);
@@ -224,10 +228,10 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
}
if (std::chrono::milliseconds(statisticInterval) !=
pool->getStatisticInterval()) {
- sprintf(
- logmsg,
- "checkPoolAttribs: Pool statisticInterval expected [%d], actual
[%lld]",
- statisticInterval, pool->getStatisticInterval().count());
+ sprintf(logmsg,
+ "checkPoolAttribs: Pool statisticInterval expected [%d], actual "
+ "[%" PRId64 "]",
+ statisticInterval, pool->getStatisticInterval().count());
LOG(logmsg);
return false;
}
@@ -243,7 +247,7 @@ bool checkPoolAttribs(std::shared_ptr<Pool> pool, SLIST&
locators,
pool->getUpdateLocatorListInterval()) {
sprintf(logmsg,
"checkPoolAttribs: Pool updateLocatorListInterval expected [%d], "
- "actual [%lld]",
+ "actual [%" PRId64 "]",
updateLocatorListInterval,
pool->getUpdateLocatorListInterval().count());
LOG(logmsg);
diff --git a/cppcache/src/CacheableBuiltins.cpp
b/cppcache/src/CacheableBuiltins.cpp
index 02dec3f..a994a6c 100644
--- a/cppcache/src/CacheableBuiltins.cpp
+++ b/cppcache/src/CacheableBuiltins.cpp
@@ -23,14 +23,14 @@ namespace client {
#define _GF_CACHEABLE_KEY_DEF_(k) const char tName_##k[] = #k;
-_GF_CACHEABLE_KEY_DEF_(CacheableBoolean);
-_GF_CACHEABLE_KEY_DEF_(CacheableByte);
-_GF_CACHEABLE_KEY_DEF_(CacheableDouble);
-_GF_CACHEABLE_KEY_DEF_(CacheableFloat);
-_GF_CACHEABLE_KEY_DEF_(CacheableInt16);
-_GF_CACHEABLE_KEY_DEF_(CacheableInt32);
-_GF_CACHEABLE_KEY_DEF_(CacheableInt64);
-_GF_CACHEABLE_KEY_DEF_(CacheableCharacter);
+_GF_CACHEABLE_KEY_DEF_(CacheableBoolean)
+_GF_CACHEABLE_KEY_DEF_(CacheableByte)
+_GF_CACHEABLE_KEY_DEF_(CacheableDouble)
+_GF_CACHEABLE_KEY_DEF_(CacheableFloat)
+_GF_CACHEABLE_KEY_DEF_(CacheableInt16)
+_GF_CACHEABLE_KEY_DEF_(CacheableInt32)
+_GF_CACHEABLE_KEY_DEF_(CacheableInt64)
+_GF_CACHEABLE_KEY_DEF_(CacheableCharacter)
} // namespace client
} // namespace geode
} // namespace apache
diff --git a/cppcache/src/CqEventImpl.cpp b/cppcache/src/CqEventImpl.cpp
index 2d0acc0..a38fc4d 100644
--- a/cppcache/src/CqEventImpl.cpp
+++ b/cppcache/src/CqEventImpl.cpp
@@ -100,8 +100,9 @@ std::string CqEventImpl::toString() {
ACE_OS::snprintf(
buffer, 1024,
"CqEvent CqName=%s; base operation=%d; cq operation= %d;key=%s;value=%s",
- m_cQuery->getName().c_str(), m_baseOp, m_queryOp,
- m_key->toString().c_str(), m_newValue->toString().c_str());
+ m_cQuery->getName().c_str(), static_cast<int>(m_baseOp),
+ static_cast<int>(m_queryOp), m_key->toString().c_str(),
+ m_newValue->toString().c_str());
return buffer;
}
std::shared_ptr<CacheableBytes> CqEventImpl::getDeltaValue() const {
diff --git a/cppcache/src/LocalRegion.cpp b/cppcache/src/LocalRegion.cpp
index dbb1714..8559d38 100644
--- a/cppcache/src/LocalRegion.cpp
+++ b/cppcache/src/LocalRegion.cpp
@@ -3162,9 +3162,9 @@ void LocalRegion::updateStatOpTime(Statistics*
statistics, int32_t statId,
}
}
-void LocalRegion::acquireGlobals(bool){};
+void LocalRegion::acquireGlobals(bool) {}
-void LocalRegion::releaseGlobals(bool){};
+void LocalRegion::releaseGlobals(bool) {}
} // namespace client
} // namespace geode
diff --git a/cppcache/src/Log.cpp b/cppcache/src/Log.cpp
index 2adcd52..b622b94 100644
--- a/cppcache/src/Log.cpp
+++ b/cppcache/src/Log.cpp
@@ -493,7 +493,8 @@ const char* Log::levelToChars(LogLevel level) {
default: {
char buf[64] = {0};
- ACE_OS::snprintf(buf, 64, "Unexpected log level: %d", level);
+ ACE_OS::snprintf(buf, 64, "Unexpected log level: %d",
+ static_cast<int>(level));
throw IllegalArgumentException(buf);
}
}
diff --git a/cppcache/src/PdxFieldType.cpp b/cppcache/src/PdxFieldType.cpp
index bdd954a..de33cda 100644
--- a/cppcache/src/PdxFieldType.cpp
+++ b/cppcache/src/PdxFieldType.cpp
@@ -137,8 +137,8 @@ std::string PdxFieldType::toString() const {
ACE_OS::snprintf(
stringBuf, 1024,
" PdxFieldName=%s TypeId=%d VarLenFieldIdx=%d sequenceid=%d\n",
- this->m_fieldName.c_str(), this->m_typeId, this->m_varLenFieldIdx,
- this->m_sequenceId);
+ this->m_fieldName.c_str(), static_cast<int>(this->m_typeId),
+ this->m_varLenFieldIdx, this->m_sequenceId);
return std::string(stringBuf);
}
diff --git a/cppcache/src/PdxInstanceImpl.cpp b/cppcache/src/PdxInstanceImpl.cpp
index 681a998..d83362c 100644
--- a/cppcache/src/PdxInstanceImpl.cpp
+++ b/cppcache/src/PdxInstanceImpl.cpp
@@ -746,7 +746,7 @@ int32_t PdxInstanceImpl::hashcode() const {
* Fix : using ACE_OS::snprintf
*/
ACE_OS::snprintf(excpStr, 256, "PdxInstance not found typeid %d ",
- pField->getTypeId());
+ static_cast<int>(pField->getTypeId()));
throw IllegalStateException(excpStr);
}
}
@@ -1293,7 +1293,7 @@ bool PdxInstanceImpl::operator==(const CacheableKey&
other) const {
* Fix : using ACE_OS::snprintf
*/
ACE_OS::snprintf(excpStr, 256, "PdxInstance not found typeid %d ",
- myPFT->getTypeId());
+ static_cast<int>(myPFT->getTypeId()));
throw IllegalStateException(excpStr);
}
}
diff --git a/cppcache/src/SerializationRegistry.cpp
b/cppcache/src/SerializationRegistry.cpp
index 5e16715..e26170d 100644
--- a/cppcache/src/SerializationRegistry.cpp
+++ b/cppcache/src/SerializationRegistry.cpp
@@ -360,7 +360,7 @@ void TheTypeMap::bind2(TypeFactoryMethod func) {
int64_t compId = 0;
if (dsfid == GeodeTypeIdsImpl::FixedIDShort) {
- compId = compId = static_cast<int64_t>(obj->classId());
+ compId = static_cast<int64_t>(obj->classId()) << 32;
} else {
compId = static_cast<int64_t>(obj->typeId());
}
diff --git a/cppcache/src/TcrConnection.cpp b/cppcache/src/TcrConnection.cpp
index b2d0fdc..e5f5da3 100644
--- a/cppcache/src/TcrConnection.cpp
+++ b/cppcache/src/TcrConnection.cpp
@@ -827,7 +827,7 @@ char* TcrConnection::readMessage(size_t* recvLen,
ConnErrType* opErr, bool
isNotificationMessage,
int32_t request) {
char msg_header[HEADER_LENGTH];
- int32_t msgType, msgLen;
+ int32_t msgLen;
ConnErrType error;
std::chrono::microseconds headerTimeout = receiveTimeoutSec;
@@ -877,7 +877,8 @@ char* TcrConnection::readMessage(size_t* recvLen,
auto input = m_connectionManager->getCacheImpl()->createDataInput(
reinterpret_cast<uint8_t*>(msg_header), HEADER_LENGTH);
- msgType = input->readInt32();
+ // ignore msgType
+ input->readInt32();
msgLen = input->readInt32();
// check that message length is valid.
if (!(msgLen > 0) && request == TcrMessage::GET_CLIENT_PR_METADATA) {
diff --git a/cppcache/src/ThinClientBaseDM.cpp
b/cppcache/src/ThinClientBaseDM.cpp
index 5d3b07c..6311313 100644
--- a/cppcache/src/ThinClientBaseDM.cpp
+++ b/cppcache/src/ThinClientBaseDM.cpp
@@ -332,7 +332,7 @@ GfErrType
ThinClientBaseDM::registerInterestForRegion(TcrEndpoint*,
return GF_NOERR;
}
-bool ThinClientBaseDM::isEndpointAttached(TcrEndpoint*) { return false; };
+bool ThinClientBaseDM::isEndpointAttached(TcrEndpoint*) { return false; }
} // namespace client
} // namespace geode
diff --git a/cppcache/src/ThinClientPoolDM.cpp
b/cppcache/src/ThinClientPoolDM.cpp
index 131e459..1f2a86e 100644
--- a/cppcache/src/ThinClientPoolDM.cpp
+++ b/cppcache/src/ThinClientPoolDM.cpp
@@ -437,11 +437,10 @@ void ThinClientPoolDM::cleanStaleConnections(volatile
bool& isRunning) {
getStats().incLoadCondDisconnects();
LOGDEBUG("Removed a connection");
} else {
- GfErrType error = GF_NOERR;
TcrConnection* newConn = nullptr;
bool maxConnLimit = false;
- error = createPoolConnection(newConn, excludeServers, maxConnLimit,
- /*hasExpired(conn) ? nullptr :*/ conn);
+ createPoolConnection(newConn, excludeServers, maxConnLimit,
+ /*hasExpired(conn) ? nullptr :*/ conn);
if (newConn) {
ACE_Time_Value nextIdle =
_idle - (ACE_OS::gettimeofday() - newConn->getLastAccessed());
@@ -2384,7 +2383,7 @@ GfErrType ThinClientPoolDM::doFailover(TcrConnection*
conn) {
return err;
}
-bool ThinClientPoolDM::canItBeDeletedNoImpl(TcrConnection*) { return false; };
+bool ThinClientPoolDM::canItBeDeletedNoImpl(TcrConnection*) { return false; }
void ThinClientPoolDM::putInQueue(TcrConnection* conn, bool,
bool isTransaction) {
@@ -2393,7 +2392,7 @@ void ThinClientPoolDM::putInQueue(TcrConnection* conn,
bool,
} else {
put(conn, false);
}
-};
+}
TcrConnection* ThinClientPoolDM::getConnectionFromQueueW(
GfErrType* error, std::set<ServerLocation>& excludeServers, bool,
diff --git a/cppcache/src/ThinClientRedundancyManager.cpp
b/cppcache/src/ThinClientRedundancyManager.cpp
index dbc37b6..b1b6f3a 100644
--- a/cppcache/src/ThinClientRedundancyManager.cpp
+++ b/cppcache/src/ThinClientRedundancyManager.cpp
@@ -1223,9 +1223,7 @@ void ThinClientRedundancyManager::doPeriodicAck() {
if (!acked) {
// clear entries' acked flag for next periodic ack
- uint32_t cleared = m_eventidmap.clearAckedFlags(entries);
- GF_D_ASSERT(cleared <= count);
- cleared = 0; // this line to avoid a 'unused var' warning in gcc
+ m_eventidmap.clearAckedFlags(entries);
}
}
}
diff --git a/cppcache/src/ThinClientRegion.cpp
b/cppcache/src/ThinClientRegion.cpp
index bca87d9..438997f 100644
--- a/cppcache/src/ThinClientRegion.cpp
+++ b/cppcache/src/ThinClientRegion.cpp
@@ -3327,7 +3327,7 @@ void ThinClientRegion::txPut(
GfErrTypeToException("Region::putTX", err);
}
-void ThinClientRegion::setProcessedMarker(bool){};
+void ThinClientRegion::setProcessedMarker(bool) {}
void ChunkedInterestResponse::reset() {
if (m_resultKeys != nullptr && m_resultKeys->size() > 0) {
@@ -3617,7 +3617,8 @@ void ChunkedFunctionExecutionResponse::handleChunk(
auto startLen =
input->getBytesRead() -
1; // from here need to look value part + memberid AND -1 for array type
- int32_t len = input->readArrayLen();
+ // iread adn gnore array length
+ input->readArrayLen();
// read a byte to determine whether to read exception part for sendException
// or read objects.
@@ -3662,8 +3663,8 @@ void ChunkedFunctionExecutionResponse::handleChunk(
// is arrayList = 65.
arrayType = input->read();
- // then its len which is 2
- len = input->readArrayLen();
+ // read and ignore its len which is 2
+ input->readArrayLen();
}
} else {
// rewind cursor by 1 to what we had read a byte to determine whether to
@@ -3898,9 +3899,8 @@ void ChunkedDurableCQListResponse::handleChunk(const
uint8_t* chunk,
auto input = m_cacheImpl->createDataInput(chunk, chunkLen);
DataInputInternal::setPoolName(*input, m_msg.getPoolName());
- // read part length
- uint32_t partLen;
- partLen = input->readInt32();
+ // read and ignore part length
+ input->readInt32();
if (!input->readBoolean()) {
// we're currently always expecting an object
char exMsg[256];
diff --git a/cryptoimpl/DHImpl.cpp b/cryptoimpl/DHImpl.cpp
index 5365928..32a65eb 100644
--- a/cryptoimpl/DHImpl.cpp
+++ b/cryptoimpl/DHImpl.cpp
@@ -64,16 +64,16 @@ static const EVP_CIPHER* getCipherFunc();
static int setSkAlgo(const char * skalgo);
*/
-ASN1_SEQUENCE(DH_PUBKEY) = {
- ASN1_SIMPLE(DH_PUBKEY, algor, X509_ALGOR),
- ASN1_SIMPLE(DH_PUBKEY, public_key, ASN1_BIT_STRING)};
-ASN1_SEQUENCE_END(DH_PUBKEY);
+ASN1_SEQUENCE(
+ DH_PUBKEY) = {ASN1_SIMPLE(DH_PUBKEY, algor, X509_ALGOR),
+ ASN1_SIMPLE(DH_PUBKEY, public_key,
+ ASN1_BIT_STRING)} ASN1_SEQUENCE_END(DH_PUBKEY)
-// This gives us the i2d/d2i x.509 (ASN1 DER) encode/decode functions
-IMPLEMENT_ASN1_FUNCTIONS(DH_PUBKEY);
+ // This gives us the i2d/d2i x.509 (ASN1 DER) encode/decode functions
+ IMPLEMENT_ASN1_FUNCTIONS(DH_PUBKEY)
-// Returns Error code
-int gf_initDhKeys(void **dhCtx, const char *dhAlgo, const char *ksPath) {
+ // Returns Error code
+ int gf_initDhKeys(void **dhCtx, const char *dhAlgo, const char *ksPath) {
int errorCode = DH_ERR_NO_ERROR; // No error;
DHImpl *dhimpl = new DHImpl();
@@ -99,35 +99,34 @@ int gf_initDhKeys(void **dhCtx, const char *dhAlgo, const
char *ksPath) {
dhimpl->m_dh = DH_new();
- int ret = -1;
const BIGNUM *pbn, *gbn;
DH_get0_pqg(dhimpl->m_dh, &pbn, NULL, &gbn);
- ret = BN_dec2bn((BIGNUM **)&pbn, dhP);
+ BN_dec2bn((BIGNUM **)&pbn, dhP);
LOGDH(" DHInit: BN_dec2bn dhP ret %d", ret);
LOGDH(" DHInit: P ptr is %p", pbn);
LOGDH(" DHInit: G ptr is %p", gbn);
LOGDH(" DHInit: length is %d", DH_get_length(dhimpl->m_dh));
- ret = BN_dec2bn((BIGNUM **)&gbn, dhG);
+ BN_dec2bn((BIGNUM **)&gbn, dhG);
LOGDH(" DHInit: BN_dec2bn dhG ret %d", ret);
DH_set_length(dhimpl->m_dh, dhL);
- ret = DH_generate_key(dhimpl->m_dh);
+ DH_generate_key(dhimpl->m_dh);
LOGDH(" DHInit: DH_generate_key ret %d", ret);
const BIGNUM *pub_key, *priv_key;
DH_get0_key(dhimpl->m_dh, &pub_key, &priv_key);
- ret = BN_num_bits(priv_key);
+ BN_num_bits(priv_key);
LOGDH(" DHInit: BN_num_bits priv_key is %d", ret);
- ret = BN_num_bits(pub_key);
+ BN_num_bits(pub_key);
LOGDH(" DHInit: BN_num_bits pub_key is %d", ret);
int codes = 0;
- ret = DH_check(dhimpl->m_dh, &codes);
+ DH_check(dhimpl->m_dh, &codes);
LOGDH(" DHInit: DH_check ret %d : codes is 0x%04X", ret, codes);
LOGDH(" DHInit: DH_size is %d", DH_size(dhimpl->m_dh));
@@ -153,10 +152,6 @@ int gf_initDhKeys(void **dhCtx, const char *dhAlgo, const
char *ksPath) {
cert = PEM_read_X509(keyStoreFP, NULL, NULL, NULL);
if (cert != NULL) {
- char *certSubject = NULL;
- X509_NAME *xname = X509_get_subject_name(cert);
- certSubject = X509_NAME_oneline(xname, NULL, 0);
- LOGDH(" Imported cert with subject : [%s]\n", certSubject);
dhimpl->m_serverCerts.push_back(cert);
}
} while (cert != NULL);
@@ -212,12 +207,10 @@ unsigned char *gf_getPublicKey(void *dhCtx, int *pLen) {
EVP_PKEY *evppubkey = EVP_PKEY_new();
LOGDH(" before assign DH ptr is %p\n", dhimpl->m_dh);
- int ret = EVP_PKEY_assign_DH(evppubkey, dhimpl->m_dh);
- LOGDH(" evp assign ret %d\n", ret);
+ EVP_PKEY_assign_DH(evppubkey, dhimpl->m_dh);
LOGDH(" after assign DH ptr is %p\n", dhimpl->m_dh);
DH_PUBKEY *dhpubkey = NULL;
- ret = DH_PUBKEY_set(&dhpubkey, evppubkey);
- LOGDH(" DHPUBKEYset ret %d\n", ret);
+ DH_PUBKEY_set(&dhpubkey, evppubkey);
int len = i2d_DH_PUBKEY(dhpubkey, NULL);
unsigned char *pubkey = new unsigned char[len];
unsigned char *temp = pubkey;
@@ -264,8 +257,7 @@ void gf_setPublicKeyOther(void *dhCtx, const unsigned char
*pubkey,
DH_PUBKEY_free(dhpubkey);
int codes = 0;
- int ret = DH_check_pub_key(dhimpl->m_dh, dhimpl->m_pubKeyOther, &codes);
- LOGDH(" DHInit: DH_check_pub_key ret %d\n", ret);
+ DH_check_pub_key(dhimpl->m_dh, dhimpl->m_pubKeyOther, &codes);
LOGDH(" DHInit: DH check_pub_key codes is 0x%04X\n", codes);
}
@@ -276,8 +268,8 @@ void gf_computeSharedSecret(void *dhCtx) {
dhimpl->m_pubKeyOther);
LOGDH("DHcomputeKey DHSize is %d", DH_size(dhimpl->m_dh));
- int ret = DH_compute_key(dhimpl->m_key, dhimpl->m_pubKeyOther, dhimpl->m_dh);
- LOGDH("DHcomputeKey ret %d : Compute err(%d): %s", ret, ERR_get_error(),
+ DH_compute_key(dhimpl->m_key, dhimpl->m_pubKeyOther, dhimpl->m_dh);
+ LOGDH("DHcomputeKey : Compute err(%d): %s", ERR_get_error(),
ERR_error_string(ERR_get_error(), NULL));
}
@@ -368,33 +360,26 @@ unsigned char *gf_encryptDH(void *dhCtx, const unsigned
char *cleartext,
int outlen, tmplen;
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
- int ret = -123;
-
const EVP_CIPHER *cipherFunc = dhimpl->getCipherFunc();
// init openssl cipher context
if (dhimpl->m_skAlgo == "AES") {
int keySize = dhimpl->m_keySize > 128 ? dhimpl->m_keySize / 8 : 16;
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL,
- (unsigned char *)dhimpl->m_key,
- (unsigned char *)dhimpl->m_key + keySize);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)dhimpl->m_key,
+ (unsigned char *)dhimpl->m_key + keySize);
} else if (dhimpl->m_skAlgo == "Blowfish") {
int keySize = dhimpl->m_keySize > 128 ? dhimpl->m_keySize / 8 : 16;
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL, NULL,
- (unsigned char *)dhimpl->m_key + keySize);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, NULL,
+ (unsigned char *)dhimpl->m_key + keySize);
LOGDH("DHencrypt: init BF ret %d", ret);
EVP_CIPHER_CTX_set_key_length(ctx, keySize);
LOGDH("DHencrypt: BF keysize is %d", keySize);
- ret = EVP_EncryptInit_ex(ctx, NULL, NULL, (unsigned char *)dhimpl->m_key,
- NULL);
+ EVP_EncryptInit_ex(ctx, NULL, NULL, (unsigned char *)dhimpl->m_key, NULL);
} else if (dhimpl->m_skAlgo == "DESede") {
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL,
- (unsigned char *)dhimpl->m_key,
- (unsigned char *)dhimpl->m_key + 24);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)dhimpl->m_key,
+ (unsigned char *)dhimpl->m_key + 24);
}
- LOGDH(" DHencrypt: init ret %d", ret);
-
if (!EVP_EncryptUpdate(ctx, ciphertext, &outlen, cleartext, len)) {
LOGDH(" DHencrypt: enc update ret NULL");
return NULL;
@@ -436,33 +421,25 @@ unsigned char *gf_decryptDH(void *dhCtx, const unsigned
char *cleartext,
int outlen, tmplen;
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
- int ret = -123;
-
const EVP_CIPHER *cipherFunc = dhimpl->getCipherFunc();
// init openssl cipher context
if (dhimpl->m_skAlgo == "AES") {
int keySize = dhimpl->m_keySize > 128 ? dhimpl->m_keySize / 8 : 16;
- ret = EVP_DecryptInit_ex(ctx, cipherFunc, NULL,
- (unsigned char *)dhimpl->m_key,
- (unsigned char *)dhimpl->m_key + keySize);
+ EVP_DecryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)dhimpl->m_key,
+ (unsigned char *)dhimpl->m_key + keySize);
} else if (dhimpl->m_skAlgo == "Blowfish") {
int keySize = dhimpl->m_keySize > 128 ? dhimpl->m_keySize / 8 : 16;
- ret = EVP_DecryptInit_ex(ctx, cipherFunc, NULL, NULL,
- (unsigned char *)dhimpl->m_key + keySize);
- LOGDH("DHencrypt: init BF ret %d", ret);
+ EVP_DecryptInit_ex(ctx, cipherFunc, NULL, NULL,
+ (unsigned char *)dhimpl->m_key + keySize);
EVP_CIPHER_CTX_set_key_length(ctx, keySize);
LOGDH("DHencrypt: BF keysize is %d", keySize);
- ret = EVP_DecryptInit_ex(ctx, NULL, NULL, (unsigned char *)dhimpl->m_key,
- NULL);
+ EVP_DecryptInit_ex(ctx, NULL, NULL, (unsigned char *)dhimpl->m_key, NULL);
} else if (dhimpl->m_skAlgo == "DESede") {
- ret = EVP_DecryptInit_ex(ctx, cipherFunc, NULL,
- (unsigned char *)dhimpl->m_key,
- (unsigned char *)dhimpl->m_key + 24);
+ EVP_DecryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)dhimpl->m_key,
+ (unsigned char *)dhimpl->m_key + 24);
}
- LOGDH(" DHencrypt: init ret %d", ret);
-
if (!EVP_DecryptUpdate(ctx, ciphertext, &outlen, cleartext, len)) {
LOGDH(" DHencrypt: enc update ret NULL");
return NULL;
@@ -531,8 +508,6 @@ bool gf_verifyDH(void *dhCtx, const char *subject,
return false;
}
- RSA *dh = EVP_PKEY_get1_RSA(evpkey);
-
const ASN1_OBJECT *macobj;
const X509_ALGOR *algorithm = nullptr;
X509_ALGOR_get0(&macobj, NULL, NULL, algorithm);
@@ -669,7 +644,6 @@ err:
EVP_PKEY *DH_PUBKEY_get(DH_PUBKEY *key) {
EVP_PKEY *ret = NULL;
long j;
- int type;
const unsigned char *p;
const unsigned char *cp;
X509_ALGOR *a;
@@ -692,10 +666,6 @@ EVP_PKEY *DH_PUBKEY_get(DH_PUBKEY *key) {
return (NULL);
}
- type = OBJ_obj2nid(key->algor->algorithm);
-
- LOGDH("DHPUBKEY type is %d", type);
-
if ((ret = EVP_PKEY_new()) == NULL) {
X509err(X509_F_X509_PUBKEY_DECODE, ERR_R_MALLOC_FAILURE);
if (asn1int != NULL) ASN1_INTEGER_free(asn1int);
diff --git a/dhimpl/DHImpl.cpp b/dhimpl/DHImpl.cpp
index 0b9b85b..44c2316 100644
--- a/dhimpl/DHImpl.cpp
+++ b/dhimpl/DHImpl.cpp
@@ -45,13 +45,6 @@ static const char *dhP =
"11180902979719649450105660478776364198726078338308557022096810447"
"3500348898008043285865193451061481841186553";
-static const char *dhG =
- "13058345680719715096166513407513969537624553636623932169016704425008150"
- "56576152779768716554354314319087014857769741104157332735258102835"
- "93126577393912282416840649805564834470583437473176415335737232689"
- "81480201869671811010996732593655666464627559582258861254878896534"
- "1273697569202082715873518528062345259949959";
-
static const int dhL = 1023;
static int DH_PUBKEY_set(DH_PUBKEY **x, EVP_PKEY *pkey);
@@ -59,16 +52,16 @@ static EVP_PKEY *DH_PUBKEY_get(DH_PUBKEY *key);
static const EVP_CIPHER *getCipherFunc();
static int setSkAlgo(const char *skalgo);
-ASN1_SEQUENCE(DH_PUBKEY) = {
- ASN1_SIMPLE(DH_PUBKEY, algor, X509_ALGOR),
- ASN1_SIMPLE(DH_PUBKEY, public_key, ASN1_BIT_STRING)};
-ASN1_SEQUENCE_END(DH_PUBKEY);
+ASN1_SEQUENCE(
+ DH_PUBKEY) = {ASN1_SIMPLE(DH_PUBKEY, algor, X509_ALGOR),
+ ASN1_SIMPLE(DH_PUBKEY, public_key,
+ ASN1_BIT_STRING)} ASN1_SEQUENCE_END(DH_PUBKEY)
-// This gives us the i2d/d2i x.509 (ASN1 DER) encode/decode functions
-IMPLEMENT_ASN1_FUNCTIONS(DH_PUBKEY);
+ // This gives us the i2d/d2i x.509 (ASN1 DER) encode/decode functions
+ IMPLEMENT_ASN1_FUNCTIONS(DH_PUBKEY)
-// Returns Error code
-int gf_initDhKeys(const char *dhAlgo, const char *ksPath) {
+ // Returns Error code
+ int gf_initDhKeys(const char *dhAlgo, const char *ksPath) {
int errorCode = DH_ERR_NO_ERROR; // No error;
// ksPath can be null
@@ -88,36 +81,25 @@ int gf_initDhKeys(const char *dhAlgo, const char *ksPath) {
m_dh = DH_new();
- int ret = -1;
-
const BIGNUM *pbn, *gbn;
DH_get0_pqg(m_dh, &pbn, NULL, &gbn);
- ret = BN_dec2bn((BIGNUM **)&pbn, dhP);
- LOGDH(" DHInit: BN_dec2bn dhP ret %d", ret);
+ BN_dec2bn((BIGNUM **)&pbn, dhP);
LOGDH(" DHInit: P ptr is %p", pbn);
LOGDH(" DHInit: G ptr is %p", gbn);
LOGDH(" DHInit: length is %d", DH_get_length(m_dh));
- ret = BN_dec2bn((BIGNUM **)&gbn, dhP);
- LOGDH(" DHInit: BN_dec2bn dhG ret %d", ret);
+ BN_dec2bn((BIGNUM **)&gbn, dhP);
DH_set_length(m_dh, dhL);
- ret = DH_generate_key(m_dh);
- LOGDH(" DHInit: DH_generate_key ret %d", ret);
+ DH_generate_key(m_dh);
const BIGNUM *pub_key, *priv_key;
DH_get0_key(m_dh, &pub_key, &priv_key);
- ret = BN_num_bits(priv_key);
- LOGDH(" DHInit: BN_num_bits priv_key is %d", ret);
-
- ret = BN_num_bits(pub_key);
- LOGDH(" DHInit: BN_num_bits pub_key is %d", ret);
-
int codes = 0;
- ret = DH_check(m_dh, &codes);
+ DH_check(m_dh, &codes);
LOGDH(" DHInit: DH_check ret %d : codes is 0x%04X", ret, codes);
LOGDH(" DHInit: DH_size is %d", DH_size(m_dh));
@@ -143,10 +125,6 @@ int gf_initDhKeys(const char *dhAlgo, const char *ksPath) {
cert = PEM_read_X509(keyStoreFP, NULL, NULL, NULL);
if (cert != NULL) {
- char *certSubject = NULL;
- X509_NAME *xname = X509_get_subject_name(cert);
- certSubject = X509_NAME_oneline(xname, NULL, 0);
- LOGDH(" Imported cert with subject : [%s]", certSubject);
m_serverCerts.push_back(cert);
}
} while (cert != NULL);
@@ -197,12 +175,10 @@ unsigned char *gf_getPublicKey(int *pLen) {
EVP_PKEY *evppubkey = EVP_PKEY_new();
LOGDH(" before assign DH ptr is %p", m_dh);
- int ret = EVP_PKEY_assign_DH(evppubkey, m_dh);
- LOGDH(" evp assign ret %d", ret);
+ EVP_PKEY_assign_DH(evppubkey, m_dh);
LOGDH(" after assign DH ptr is %p", m_dh);
DH_PUBKEY *dhpubkey = NULL;
- ret = DH_PUBKEY_set(&dhpubkey, evppubkey);
- LOGDH(" DHPUBKEYset ret %d", ret);
+ DH_PUBKEY_set(&dhpubkey, evppubkey);
int len = i2d_DH_PUBKEY(dhpubkey, NULL);
unsigned char *pubkey = new unsigned char[len];
unsigned char *temp = pubkey;
@@ -349,30 +325,26 @@ unsigned char *gf_encryptDH(const unsigned char
*cleartext, int len,
int outlen, tmplen;
EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
- int ret = -123;
-
const EVP_CIPHER *cipherFunc = getCipherFunc();
// init openssl cipher context
if (m_skAlgo == "AES") {
int keySize = m_keySize > 128 ? m_keySize / 8 : 16;
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)m_key,
- (unsigned char *)m_key + keySize);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)m_key,
+ (unsigned char *)m_key + keySize);
} else if (m_skAlgo == "Blowfish") {
int keySize = m_keySize > 128 ? m_keySize / 8 : 16;
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL, NULL,
- (unsigned char *)m_key + keySize);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, NULL,
+ (unsigned char *)m_key + keySize);
LOGDH("DHencrypt: init BF ret %d", ret);
EVP_CIPHER_CTX_set_key_length(ctx, keySize);
LOGDH("DHencrypt: BF keysize is %d", keySize);
- ret = EVP_EncryptInit_ex(ctx, NULL, NULL, (unsigned char *)m_key, NULL);
+ EVP_EncryptInit_ex(ctx, NULL, NULL, (unsigned char *)m_key, NULL);
} else if (m_skAlgo == "DESede") {
- ret = EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)m_key,
- (unsigned char *)m_key + 24);
+ EVP_EncryptInit_ex(ctx, cipherFunc, NULL, (unsigned char *)m_key,
+ (unsigned char *)m_key + 24);
}
- LOGDH(" DHencrypt: init ret %d", ret);
-
if (!EVP_EncryptUpdate(ctx, ciphertext, &outlen, cleartext, len)) {
LOGDH(" DHencrypt: enc update ret NULL");
return NULL;
@@ -389,7 +361,7 @@ unsigned char *gf_encryptDH(const unsigned char *cleartext,
int len,
outlen += tmplen;
- ret = EVP_CIPHER_CTX_cleanup(ctx);
+ EVP_CIPHER_CTX_cleanup(ctx);
LOGDH("DHencrypt: in len is %d, out len is %d", len, outlen);
@@ -568,7 +540,6 @@ err:
EVP_PKEY *DH_PUBKEY_get(DH_PUBKEY *key) {
EVP_PKEY *ret = NULL;
long j;
- int type;
const unsigned char *p;
const unsigned char *cp;
X509_ALGOR *a;
@@ -590,10 +561,6 @@ EVP_PKEY *DH_PUBKEY_get(DH_PUBKEY *key) {
return (NULL);
}
- type = OBJ_obj2nid(key->algor->algorithm);
-
- LOGDH("DHPUBKEY type is %d", type);
-
if ((ret = EVP_PKEY_new()) == NULL) {
X509err(X509_F_X509_PUBKEY_DECODE, ERR_R_MALLOC_FAILURE);
if (asn1int != NULL) ASN1_INTEGER_free(asn1int);
diff --git a/tests/cpp/fwklib/TcpIpc.cpp b/tests/cpp/fwklib/TcpIpc.cpp
index 68d5fc8..4664268 100644
--- a/tests/cpp/fwklib/TcpIpc.cpp
+++ b/tests/cpp/fwklib/TcpIpc.cpp
@@ -95,11 +95,8 @@ void TcpIpc::init(int32_t sockBufferSize) {
if (sockBufferSize > 0) {
clearNagle(sock);
- int32_t size = setSize(sock, SO_SNDBUF, sockBufferSize);
- size = setSize(sock, SO_RCVBUF, sockBufferSize);
- } else {
- int32_t size = getSize(sock, SO_SNDBUF);
- size = getSize(sock, SO_RCVBUF);
+ setSize(sock, SO_SNDBUF, sockBufferSize);
+ setSize(sock, SO_RCVBUF, sockBufferSize);
}
m_io = new ACE_SOCK_Stream(sock);
ACE_OS::signal(SIGPIPE, SIG_IGN); // Ignore broken pipe
diff --git a/tests/cpp/security/Security.cpp b/tests/cpp/security/Security.cpp
index 9b46d99..6e93efb 100644
--- a/tests/cpp/security/Security.cpp
+++ b/tests/cpp/security/Security.cpp
@@ -820,15 +820,12 @@ std::shared_ptr<Cacheable> Security::getUserObject(const
std::string &objType) {
resetValue("valueSizes");
int objSize = getIntValue("valueSizes");
QueryHelper *qh = &QueryHelper::getHelper();
- int numSet = 0;
int setSize = 0;
if (objType == "Portfolio") {
setSize = qh->getPortfolioSetSize();
- numSet = numOfKeys / setSize;
usrObj = std::make_shared<Portfolio>(GsRandom::random(setSize), objSize);
} else if (objType == "Position") {
setSize = qh->getPositionSetSize();
- numSet = numOfKeys / setSize;
int numSecIds = sizeof(secIds) / sizeof(char *);
usrObj =
std::make_shared<Position>(secIds[setSize % numSecIds], setSize * 100);
diff --git a/tests/cpp/testobject/BatchObject.cpp
b/tests/cpp/testobject/BatchObject.cpp
index f224be0..79208ab 100644
--- a/tests/cpp/testobject/BatchObject.cpp
+++ b/tests/cpp/testobject/BatchObject.cpp
@@ -48,7 +48,8 @@ void BatchObject::fromData(apache::geode::client::DataInput&
input) {
std::string BatchObject::toString() const {
char buf[102500];
sprintf(buf,
- "BatchObject:[index = %d timestamp = %lld batch = %d byteArray=%d ]",
+ "BatchObject:[index = %d timestamp = %" PRIu64
+ " batch = %d byteArray=%d ]",
index, timestamp, batch, byteArray->length());
return buf;
}
diff --git a/tests/cpp/testobject/DeltaFastAssetAccount.hpp
b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
index f0e9003..785d8f3 100644
--- a/tests/cpp/testobject/DeltaFastAssetAccount.hpp
+++ b/tests/cpp/testobject/DeltaFastAssetAccount.hpp
@@ -78,7 +78,7 @@ class TESTOBJECT_EXPORT DeltaFastAssetAccount : public
Cacheable, public Delta {
char buf[102500];
sprintf(buf,
"DeltaFastAssetAccount:[acctId = %d customerName = %s netWorth = "
- "%f timestamp = %lld]",
+ "%f timestamp = %" PRIu64 "]",
acctId, customerName->toString().c_str(), netWorth, timestamp);
return buf;
}
diff --git a/tests/cpp/testobject/DeltaPSTObject.cpp
b/tests/cpp/testobject/DeltaPSTObject.cpp
index 84787da..f8949c4 100644
--- a/tests/cpp/testobject/DeltaPSTObject.cpp
+++ b/tests/cpp/testobject/DeltaPSTObject.cpp
@@ -64,9 +64,9 @@ void
DeltaPSTObject::fromData(apache::geode::client::DataInput& input) {
}
std::string DeltaPSTObject::toString() const {
char buf[102500];
- sprintf(
- buf,
- "DeltaPSTObject:[timestamp = %lld field1 = %d field2 = %c valueData=%d
]",
- timestamp, field1, field2, valueData->length());
+ sprintf(buf,
+ "DeltaPSTObject:[timestamp = %" PRIu64
+ " field1 = %d field2 = %c valueData=%d ]",
+ timestamp, field1, field2, valueData->length());
return buf;
}
diff --git a/tests/cpp/testobject/EqStruct.cpp
b/tests/cpp/testobject/EqStruct.cpp
index f8ba162..8d80c54 100644
--- a/tests/cpp/testobject/EqStruct.cpp
+++ b/tests/cpp/testobject/EqStruct.cpp
@@ -200,7 +200,7 @@ void EqStruct::fromData(apache::geode::client::DataInput
&in) {
}
std::string EqStruct::toString() const {
char buf[102500];
- sprintf(buf, "EqStruct:[timestamp = %lld myIndex = %d cxlQty = %d ]",
+ sprintf(buf, "EqStruct:[timestamp = %" PRIu64 " myIndex = %d cxlQty = %d ]",
timestamp, myIndex, cxlQty);
return buf;
}
diff --git a/tests/cpp/testobject/PSTObject.cpp
b/tests/cpp/testobject/PSTObject.cpp
index 53bd0d2..87c5bc1 100644
--- a/tests/cpp/testobject/PSTObject.cpp
+++ b/tests/cpp/testobject/PSTObject.cpp
@@ -55,7 +55,7 @@ void PSTObject::fromData(apache::geode::client::DataInput&
input) {
std::string PSTObject::toString() const {
char buf[102500];
sprintf(buf,
- "PSTObject:[timestamp = %lld field1 = %d field2 = %c valueData=%d ]",
+ "PSTObject:[timestamp = %" PRIu64 " field1 = %d field2 = %c
valueData=%d ]",
timestamp, field1, field2, valueData->length());
return buf;
}
diff --git a/tests/cpp/testobject/PortfolioPdx.cpp
b/tests/cpp/testobject/PortfolioPdx.cpp
index b692635..a049528 100644
--- a/tests/cpp/testobject/PortfolioPdx.cpp
+++ b/tests/cpp/testobject/PortfolioPdx.cpp
@@ -105,14 +105,10 @@ void PortfolioPdx::fromData(PdxReader& pr) {
type = pr.readString("type");
status = pr.readString("status");
- int32_t strLenArray = 0;
names = pr.readStringArray("names");
- int32_t byteArrayLen = 0;
newVal = pr.readByteArray("newVal");
creationDate = pr.readDate("creationDate");
- int32_t arrayNullLen = 0;
arrayNull = pr.readByteArray("arrayNull");
- int32_t arrayZeroSizeLen = 0;
arrayZeroSize = pr.readByteArray("arrayZeroSize");
}
std::string PortfolioPdx::toString() const {
diff --git a/tests/cpp/testobject/PositionPdx.cpp
b/tests/cpp/testobject/PositionPdx.cpp
index 49f8ddc..5972784 100644
--- a/tests/cpp/testobject/PositionPdx.cpp
+++ b/tests/cpp/testobject/PositionPdx.cpp
@@ -28,7 +28,6 @@ PositionPdx::PositionPdx() { init(); }
PositionPdx::PositionPdx(const char* id, int32_t out) {
init();
- size_t strSize = strlen(id) + 1;
secId = std::string(id);
qty = out * (cnt % 2 == 0 ? 10.0 : 100.0);
diff --git a/tests/cpp/testobject/VariousPdxTypes.cpp
b/tests/cpp/testobject/VariousPdxTypes.cpp
index b699d2b..ff7abb1 100644
--- a/tests/cpp/testobject/VariousPdxTypes.cpp
+++ b/tests/cpp/testobject/VariousPdxTypes.cpp
@@ -402,7 +402,6 @@ void PdxTypes6::fromData(PdxReader &pr) {
m_i1 = pr.readInt("i1");
// LOGDEBUG("PdxTypes6::fromData m_i1 = %d", m_i1);
- int32_t byteArrLen = 0;
bytes128 = pr.readByteArray("bytes128");
m_i2 = pr.readInt("i2");
// LOGDEBUG("PdxTypes6::fromData m_i2 = %d", m_i2);
@@ -477,7 +476,6 @@ std::string PdxTypes7::toString() const {
m_i1 = pr.readInt("i1");
m_i2 = pr.readInt("i2");
m_s1 = pr.readString("s1");
- int32_t byteArrLen = 0;
bytes38000 = pr.readByteArray("bytes38000");
m_i3 = pr.readInt("i3");
m_i4 = pr.readInt("i4");
@@ -543,7 +541,6 @@ std::string PdxTypes8::toString() const {
m_i1 = pr.readInt("i1");
m_i2 = pr.readInt("i2");
m_s1 = pr.readString("s1");
- int32_t byteArrLen = 0;
bytes300 = pr.readByteArray("bytes300");
_enum = pr.readObject("_enum");
m_s2 = pr.readString("s2");
@@ -602,7 +599,6 @@ void PdxTypes9::toData(PdxWriter &pw) const {
void PdxTypes9::fromData(PdxReader &pr) {
m_s1 = pr.readString("s1");
m_s2 = pr.readString("s2");
- int32_t byteArrLen = 0;
m_bytes66000 = pr.readByteArray("bytes66000");
m_s3 = pr.readString("s3");
m_s4 = pr.readString("s4");
@@ -660,7 +656,6 @@ void PdxTypes10::toData(PdxWriter &pw) const {
void PdxTypes10::fromData(PdxReader &pr) {
m_s1 = pr.readString("s1");
m_s2 = pr.readString("s2");
- int32_t byteArrLen = 0;
m_bytes66000 = pr.readByteArray("bytes66000");
m_s3 = pr.readString("s3");
m_s4 = pr.readString("s4");
--
To stop receiving notification emails like this one, please contact
[email protected].