summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--src/3rd_party-static/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp2
-rw-r--r--src/components/policy/test/policy_manager_impl_test.cc14
3 files changed, 9 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5cf7d1186..aef26c2952 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -173,7 +173,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR})
set(ARCHIVE_OUTPUT_DIRECTORY ./bin)
-set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wall -Werror -Wuninitialized -Wvla")
+set(CMAKE_CXX_FLAGS "-fPIC -std=gnu++0x -Wall -Werror -Wno-deprecated-declarations -Wuninitialized -Wvla")
if(ENABLE_SANITIZE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
diff --git a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp
index 1e63f0ba31..fb24d08f1c 100644
--- a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp
+++ b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/CMessageBrokerRegistry.cpp
@@ -77,7 +77,7 @@ namespace NsMessageBroker
std::map <std::string, int>::iterator it = mControllersList.begin();
for (; it != mControllersList.end();) {
if (it->second == fd) {
- mControllersList.erase(it);
+ mControllersList.erase(it++);
} else {
++it;
}
diff --git a/src/components/policy/test/policy_manager_impl_test.cc b/src/components/policy/test/policy_manager_impl_test.cc
index 2dc5ab69d9..033012d2c0 100644
--- a/src/components/policy/test/policy_manager_impl_test.cc
+++ b/src/components/policy/test/policy_manager_impl_test.cc
@@ -222,7 +222,7 @@ class PolicyManagerImplTest2 : public ::testing::Test {
Json::Reader reader;
std::string json;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
json = root.toStyledString();
}
ifile.close();
@@ -363,7 +363,7 @@ TEST_F(PolicyManagerImplTest2, IsAppRevoked_SetRevokedAppID_ExpectAppRevoked) {
Json::Reader reader;
std::string json;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
root["policy_table"]["app_policies"][app_id1] = Json::nullValue;
json = root.toStyledString();
}
@@ -380,7 +380,7 @@ TEST_F(PolicyManagerImplTest2, CheckPermissions_SetRevokedAppID_ExpectRPCDisallo
Json::Reader reader;
std::string json;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
root["policy_table"]["app_policies"][app_id1] = Json::nullValue;
json = root.toStyledString();
}
@@ -422,7 +422,7 @@ TEST_F(PolicyManagerImplTest2, CheckPermissions_SetAppIDwithPolicies_ExpectRPCAl
Json::Reader reader;
std::string json;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
// Add AppID with policies
root["policy_table"]["app_policies"]["1234"] = Json::Value(Json::objectValue);
root["policy_table"]["app_policies"]["1234"]["memory_kb"] = Json::Value(50);
@@ -819,7 +819,7 @@ TEST_F(PolicyManagerImplTest2, NextRetryTimeout_ExpectTimeoutsFromPT) {
std::ifstream ifile("sdl_preloaded_pt.json");
Json::Reader reader;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
Json::Value seconds_between_retries = Json::Value(Json::arrayValue);
seconds_between_retries = root["policy_table"]["module_config"]["seconds_between_retries"];
uint32_t size = seconds_between_retries.size();
@@ -849,7 +849,7 @@ TEST_F(PolicyManagerImplTest2, UpdatedPreloadedPT_ExpectLPT_IsUpdated) {
Json::Reader reader;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
root["policy_table"]["module_config"]["preloaded_date"] = new_data.new_date_;
Json::Value val(Json::objectValue);
Json::Value val2(Json::arrayValue);
@@ -939,7 +939,7 @@ TEST_F(PolicyManagerImplTest2, RetrySequenceDelaysSeconds_Expect_CorrectValues)
std::ifstream ifile("sdl_preloaded_pt.json");
Json::Reader reader;
Json::Value root(Json::objectValue);
- if (ifile != NULL && reader.parse(ifile, root, true)) {
+ if (ifile.is_open() && reader.parse(ifile, root, true)) {
Json::Value seconds_between_retries = Json::Value(Json::arrayValue);
seconds_between_retries = root["policy_table"]["module_config"]["seconds_between_retries"];
uint32_t size = seconds_between_retries.size();