fix: 3.0 LTS 告警清零

【背景】
3.0 LTS 经过扫描有一些告警需要清理

【修改方案】
在需要的地方添加了强制类型转换

【影响】
对现有的产品编译不会有影响。

re #I4UZW3

Signed-off-by: yinjiaming <yinjiaming@huawei.com>
Change-Id: I1f9cd16293b649ea9f9b3c4d3d02b1bfe95114e2
This commit is contained in:
yinjiaming 2022-02-23 11:02:55 +00:00
parent 89154a3765
commit 84011c89a5
4 changed files with 5 additions and 5 deletions

View File

@ -46,7 +46,7 @@ INT32 LOS_StrncpyFromUser(CHAR *dst, const CHAR *src, INT32 count)
}
maxCount = (LOS_IsUserAddressRange((VADDR_T)(UINTPTR)src, (size_t)count)) ? \
count : (USER_ASPACE_TOP_MAX - (UINTPTR)src);
count : (INT32)(USER_ASPACE_TOP_MAX - (UINTPTR)src);
for (i = 0; i < maxCount; ++i) {
if (LOS_GetUser(&character, src + offset) != LOS_OK) {

View File

@ -134,7 +134,7 @@ int fallocate64(int fd, int mode, off64_t offset, off64_t len)
return VFS_ERROR;
}
if (filep->f_oflags & O_DIRECTORY)
if ((unsigned int)filep->f_oflags & O_DIRECTORY)
{
set_errno(EBADF);
return VFS_ERROR;

View File

@ -1216,12 +1216,12 @@ LITE_OS_SEC_TEXT int LiteIpcIoctl(struct file *filep, int cmd, unsigned long arg
}
ret = LiteIpcMsgHandle((IpcContent *)(UINTPTR)arg);
if (ret != LOS_OK) {
return ret;
return (int)ret;
}
break;
default:
PRINT_ERR("Unknow liteipc ioctl cmd:%d\n", cmd);
return -EINVAL;
}
return ret;
return (int)ret;
}

View File

@ -148,7 +148,7 @@ static int HiLogBufferCopy(unsigned char *dst, unsigned dstLen, unsigned char *s
static int HiLogReadRingBuffer(unsigned char *buffer, size_t bufLen)
{
size_t retval;
int retval;
size_t bufLeft = HILOG_BUFFER - g_hiLogDev.headOffset;
if (bufLeft > bufLen) {
retval = HiLogBufferCopy(buffer, bufLen, HiLogBufferHead(), bufLen);