!130 CM适配GCC10.3的编译

Merge pull request !130 from Cross-罗/master
This commit is contained in:
opengauss-bot 2023-06-13 13:44:50 +00:00 committed by Gitee
commit 8032586682
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 5 additions and 2 deletions

View File

@ -312,7 +312,10 @@ static status_t GetMatchPoint(char *text, char matchPoint, uint32 *point)
while (CM_IS_QUOTE_CHAR(text[tempPoint])) {
if (text[strlen(text) - 1] == text[tempPoint]) {
/* This tells the compiler that there will be no overflow issues */
#pragma GCC diagnostic ignored "-Wstringop-overflow"
text[strlen(text) - 1] = '\0';
#pragma GCC diagnostic pop
}
if ((tempPoint + 1) >= strlen(text)) {
write_runlog(ERROR, "%d failed to getMatchPoint, bacause text=[%s], point=[%u: %zu].\n",

View File

@ -43,6 +43,7 @@
#include "config.h"
#include "cm_util.h"
#include "ctl_help.h"
#include <string>
#define ETCD_NUM_UPPER_LIMIT 50

View File

@ -379,8 +379,7 @@ static status_t GetConfigParamValue(const char *ptr, ParamEnumEntry &varList)
int ret;
if (ptr == NULL) {
write_runlog(DEBUG1, "Failed to parse the \"%s\" info. The value range information \"%s\" is incorrect.\n",
varList.name, ptr);
write_runlog(DEBUG1, "Failed to parse the \"%s\" info. The value is null.\n", varList.name);
return CM_ERROR;
}