From ee64ad6250c8784669a1be1cbccebb513522e10f Mon Sep 17 00:00:00 2001 From: Jeremyzz Date: Thu, 18 May 2023 16:05:52 +0800 Subject: [PATCH 1/2] fix code alarm Signed-off-by: Jeremyzz --- .../data_share/gaussdb_rd/src/common/src/json_common.cpp | 3 ++- .../gaussdb_rd/src/interface/src/result_set_common.cpp | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/src/json_common.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/src/json_common.cpp index 7380fa09..cf106f22 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/src/json_common.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/common/src/json_common.cpp @@ -546,7 +546,8 @@ int JsonCommon::Append(const JsonObject &src, const JsonObject &add, bool isRepl { int externErrCode = E_OK; JsonObjectIterator(add, {}, - [&src, &externErrCode, &isReplace](const JsonFieldPath &path, const JsonObject &father, const JsonObject &item) { + [&src, &externErrCode, &isReplace](const JsonFieldPath &path, const JsonObject &father, + const JsonObject &item) { bool isCollapse = false; // Whether there is a path generated by the dot operator, such as t1.t2.t3 JsonFieldPath itemPath = ExpendPathForField(path, isCollapse); if (src.IsFieldExists(itemPath)) { diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp index e0b9bc24..3b0b6055 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp @@ -15,9 +15,6 @@ #include "result_set_common.h" -#include -#include - #include "doc_errno.h" #include "grd_base/grd_error.h" -- Gitee From 157ae2a50b1b1cee05793d0f40208bb78f235283 Mon Sep 17 00:00:00 2001 From: Jeremyzz Date: Thu, 18 May 2023 17:39:36 +0800 Subject: [PATCH 2/2] fix alarm Signed-off-by: Jeremyzz --- .../gaussdb_rd/src/interface/src/result_set_common.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp index 3b0b6055..d6e070aa 100644 --- a/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp +++ b/services/distributeddataservice/service/data_share/gaussdb_rd/src/interface/src/result_set_common.cpp @@ -22,7 +22,7 @@ namespace DocumentDB { class ValueObject; int InitResultSet(std::shared_ptr &context, DocumentStore *store, ResultSet &resultSet, bool ifField) { - if (ifField == false) { + if (!ifField) { if (context->projectionTree.ParseTree(context->projectionPath) == -E_INVALID_ARGS) { GLOGE("Parse ProjectionTree failed"); return -E_INVALID_ARGS; -- Gitee