内核codex告警清零

Signed-off-by: Kiita <zhanyan@huawei.com>
Change-Id: I6b0bc9ba638f7aa73be754d5c92561fc372de1c6
This commit is contained in:
zhangyan
2022-04-21 12:22:21 +00:00
parent 88a0caae24
commit ffe7462c7f
25 changed files with 76 additions and 76 deletions

View File

@@ -214,7 +214,7 @@ UINT64 LOS_SizeStrToNum(CHAR *value)
UINT64 num = 0;
/* If the string is a hexadecimal value */
if (sscanf_s(value, "0x%x", &num) > 0) {
if (sscanf_s(value, "0x%x", (UINTPTR)(&num)) > 0) {
value += strlen("0x");
if (strspn(value, "0123456789abcdefABCDEF") < strlen(value)) {
goto ERROUT;
@@ -223,7 +223,7 @@ UINT64 LOS_SizeStrToNum(CHAR *value)
}
/* If the string is a decimal value in unit *Bytes */
INT32 ret = sscanf_s(value, "%d", &num);
INT32 ret = sscanf_s(value, "%llu", &num);
INT32 decOffset = strspn(value, "0123456789");
CHAR *endPos = value + decOffset;
if ((ret <= 0) || (decOffset < (strlen(value) - 1))) {