From dccc1ca1304dc1fcb86c8e24edd491509269b3e7 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期日, 29 一月 2023 14:44:52 +0800 Subject: [PATCH] 解决编译告警 --- util.h | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/util.h b/util.h index fe470fa..e7b8702 100644 --- a/util.h +++ b/util.h @@ -44,11 +44,10 @@ { using TMPT = typename std::remove_reference<decltype(*list.begin())>::type; TMPT t; - string jsonString; + string jsonString; int len = list.size(); - bRet = false; - - jsonString += "["; + bool bRet = false; + jsonString += "["; for ( int i= 0 ; i < len ; i++ ) { @@ -61,10 +60,10 @@ jsonString += tmpjsonString; } - jsonString += "]"; + jsonString += "]"; - json = jsonString; - + json = jsonString; + return bRet; } @@ -145,8 +144,8 @@ } else { - success_name = "success"; - data_name = "data"; + success_name = (char *)"success"; + data_name = (char *)"data"; } return bus_dbapi_get_list(json, (const char *)success_name, (const char *)data_name, list); @@ -182,4 +181,4 @@ return iRet; } -#endif \ No newline at end of file +#endif -- Gitblit v1.8.0