Fix new toolchain build errors 86/294486/7
authorTomasz Swierczek <t.swierczek@samsung.com>
Tue, 20 Jun 2023 04:41:19 +0000 (06:41 +0200)
committerTomasz Swierczek <t.swierczek@samsung.com>
Tue, 20 Jun 2023 12:47:21 +0000 (14:47 +0200)
Change-Id: Id6c6852c41808d6d7cf447261fc1a88b01c06d44

src/common/plugin/PluginManager.cpp
src/cyad/CommandlineParser/HumanReadableParser.cpp
test/chsgen/checksumgenerator.cpp

index b8a0b186eebc28c217d6ffd3b5720939a3c85ba8..06bcc8e03cea2e997c8376a9eda7a45674d23cc2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2020 Samsung Electronics Co., Ltd. All rights reserved.
+ * Copyright (c) 2014-2023 Samsung Electronics Co., Ltd. All rights reserved.
  *
  * This file is licensed under the terms of MIT License or the Apache License
  * Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -127,7 +127,7 @@ void PluginManager::openPlugin(const std::string &path) {
         LOGW("File could not be dlopened <%s> : <%s>", path.c_str(), dlerror());
         return;
     }
-    PluginLibPtr handlePtr(handle, std::ptr_fun(dlclose));
+    PluginLibPtr handlePtr(handle, std::function(dlclose));
 
     //Flush any previous errors
     dlerror();
index c4edd84a6c2d96130b216b3e82b7d5786c19b477..61a321dcf9af7e9570c87e3cd1dca320b5b73d9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2020 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2015-2023 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * This file is licensed under the terms of MIT License or the Apache License
  * Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -26,6 +26,7 @@
  */
 
 #include <algorithm>
+#include <stdexcept>
 #include <string>
 #include <unordered_set>
 
index 7adc465f773d506f9243803e8c34ddea7e6d5a8c..ddf37ed0fec6942694768a4547a133d155e51bbd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2020 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2015-2023 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * This file is licensed under the terms of MIT License or the Apache License
  * Version 2.0 of your choice. See the LICENSE.MIT file for MIT license details.
@@ -234,7 +234,7 @@ TEST_F(ChsgenCommandlineTest, recordGenerationDefaultPositive) {
     std::string err;
     std::string out;
 
-    for (const std::string &file : { "_", "buckets" }) {
+    for (const std::string &file : { std::string("_"), std::string("buckets") }) {
         clearOutput();
         prepare_argv({ execName, Cynara::PathConfig::testsPath + "/db3/" + file });
         SCOPED_TRACE(file);
@@ -263,7 +263,7 @@ TEST_F(ChsgenCommandlineTest, recordGenerationMD5Positive) {
     std::string err;
     std::string out;
 
-    for (const std::string &file : { "_", "buckets" }) {
+    for (const std::string &file : { std::string("_"), std::string("buckets") }) {
         clearOutput();
         prepare_argv({ execName, "-a", "md5", Cynara::PathConfig::testsPath + "/db3/" + file });
         SCOPED_TRACE(file);
@@ -292,7 +292,7 @@ TEST_F(ChsgenCommandlineTest, recordGenerationCryptPositive) {
     std::string err;
     std::string out;
 
-    for (const std::string &file : { "_", "buckets" }) {
+    for (const std::string &file : { std::string("_"), std::string("buckets") }) {
         clearOutput();
         prepare_argv({ execName, "-a", "crypt", Cynara::PathConfig::testsPath + "/db3/" + file });
         SCOPED_TRACE(file);
@@ -320,7 +320,7 @@ TEST_F(ChsgenCommandlineTest, suffixErasingPositive) {
     std::string err;
     std::string out;
 
-    for (const std::string &file : { "_", "_additional", "buckets" }) {
+    for (const std::string &file : { std::string("_"), std::string("_additional"), std::string("buckets") }) {
         clearOutput();
         prepare_argv({ execName,
                        Cynara::PathConfig::testsPath + "/db6/" + file + backupFilenameSuffix });