Fixed the build error using gcc 13 08/295208/4
authorwchang kim <wchang.kim@samsung.com>
Mon, 3 Jul 2023 23:06:34 +0000 (08:06 +0900)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Tue, 11 Jul 2023 08:05:15 +0000 (08:05 +0000)
Change-Id: I716b3be00e9e2015591af34b33031726fa1b5969

common/DBFixture.cpp
misc/ckm_db_tool/CMakeLists.txt
misc/encryption_perf/main.cpp
src/manager/common/stringify.h
src/manager/initial-values/NoCharactersHandler.cpp
src/manager/service/ckm-logic.cpp
src/manager/service/for-each-file.h
src/manager/sqlcipher/sqlcipher.c
unit-tests/CMakeLists.txt

index ee85abc..b310521 100644 (file)
@@ -233,7 +233,7 @@ void DBFixture::insert_row(const Name &name, const ClientId &owner)
 
 void DBFixture::delete_row(const Name &name, const ClientId &owner)
 {
-       bool exit_flag;
+       bool exit_flag=0;
        BOOST_REQUIRE_NO_THROW(exit_flag = m_db.deleteRow(name, owner));
        BOOST_REQUIRE_MESSAGE(true == exit_flag, "remove name failed: no rows removed");
 }
index 00b800e..a061da9 100644 (file)
@@ -2,6 +2,8 @@ SET(CKM_DB_TOOL "ckm_db_tool")
 SET(CKM_DB_MERGE "ckm_db_merge")
 SET(KEY_MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)
 
+ADD_DEFINITIONS("-Wno-alloc-size-larger-than")
+
 FIND_PACKAGE(Threads REQUIRED)
 
 INCLUDE_DIRECTORIES(
index 1a2409f..0dd6ab9 100644 (file)
@@ -9,6 +9,7 @@ const char* const ALIAS = "enc_perf_test";
 
 int main(int argc, char* argv[])
 {
+       std::chrono::duration<double> duration{};
        int ret;
        ckmc_policy_s policy {nullptr, false};
        ckmc_raw_buffer_s* input = nullptr;
@@ -57,7 +58,6 @@ int main(int argc, char* argv[])
                goto finish;
        }
 
-       std::chrono::duration<double> duration;
        for(;;) {
                size_t chunkSize = std::min(size, maxSize);
 
index 300b1ea..fc919fd 100644 (file)
 #define STRINGIFY_15(msg, ...) << msg STRINGIFY_14(__VA_ARGS__)
 #define STRINGIFY_(N, ...) CONCAT(STRINGIFY_, N)(__VA_ARGS__)
 
+/*
+ * flush() is needed to work around a bug described here:
+ * https://bugs.llvm.org/show_bug.cgi?id=20596
+ */
 #define Stringify(...)                                        \
-    (static_cast<std::ostringstream &>(std::ostringstream()   \
+    (static_cast<std::ostringstream &>(std::ostringstream().flush()   \
         STRINGIFY_(PP_NARG(__VA_ARGS__), __VA_ARGS__))).str()
index e43c130..a23c9d5 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <cctype>
 #include <algorithm>
+#include <stdexcept>
 #include <exception>
 
 namespace CKM {
index f57f920..ea59099 100644 (file)
@@ -1601,7 +1601,7 @@ RawBuffer CKMLogic::importWrappedKey(
                }
 
                Token token = wrappingKey->unwrap(params,
-                                                                                 Crypto::Data(keyType, std::move(wrappedKey)),
+                                                                                 Crypto::Data(keyType, wrappedKey),
                                                                                  policy.password,
                                                                                  digest);
 
index 0c03234..7b35ade 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <functional>
 #include <vector>
+#include <string>
 
 namespace CKM {
 
index 97059a2..eadacc5 100644 (file)
@@ -119238,7 +119238,8 @@ SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
   if( x<99 ){
     pIdx->pTable->nRowLogEst = x = 99;
   }
-  if( pIdx->pPartIdxWhere!=0 ) x -= 10;  assert( 10==sqlite3LogEst(2) );
+  if( pIdx->pPartIdxWhere!=0 ) x -= 10;
+  assert( 10==sqlite3LogEst(2) );
   a[0] = x;
 
   /* Estimate that a[1] is 10, a[2] is 9, a[3] is 8, a[4] is 7, a[5] is
index 3f7ad2e..1dfb7be 100644 (file)
@@ -34,6 +34,8 @@ ADD_DEFINITIONS("-DPKCS12_TEST_DIR=\"${PKCS12_TEST_DIR}\"")
 
 ADD_DEFINITIONS("-DBOOST_TEST_DYN_LINK")
 ADD_DEFINITIONS("-DOVERRIDE_SOCKET_TIMEOUT=10")
+ADD_DEFINITIONS("-Wno-self-move")
+ADD_DEFINITIONS("-Wno-stringop-truncation")
 
 SET(MANAGER_PATH ${PROJECT_SOURCE_DIR}/src/manager)