commit
8032586682
@ -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",
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "config.h"
|
||||
#include "cm_util.h"
|
||||
#include "ctl_help.h"
|
||||
#include <string>
|
||||
|
||||
#define ETCD_NUM_UPPER_LIMIT 50
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user