From 1cdd7307f3882891cc962b3d5d3018310656b62a Mon Sep 17 00:00:00 2001 From: x-xiny <1301913191@qq.com> Date: Thu, 6 Jan 2022 07:38:41 +0000 Subject: [PATCH] =?UTF-8?q?=20Codex=E5=91=8A=E8=AD=A6=E6=B8=85=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【背景】 Codex扫描告警清除 【修改方案】 将不可屏蔽告警进行修复 re #I4PNO3 Signed-off-by: xuiny Change-Id: If6f85eb9679d47e6256f24cdc74246df78da579d --- apps/shell/src/shmsg.c | 2 ++ compat/posix/src/misc.c | 6 ++++-- kernel/extended/hidumper/los_hidumper.c | 2 +- syscall/fs_syscall.c | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/apps/shell/src/shmsg.c b/apps/shell/src/shmsg.c index 37cd32ef..40a18d7c 100644 --- a/apps/shell/src/shmsg.c +++ b/apps/shell/src/shmsg.c @@ -364,11 +364,13 @@ void ChildExec(const char *cmdName, char *const paramArray[]) gid = getpgrp(); if (gid < 0) { printf("get group id failed, pgrpid %d, errno %d\n", gid, errno); + exit(1); } ret = tcsetpgrp(STDIN_FILENO, gid); if (ret != 0) { printf("tcsetpgrp failed, errno %d\n", errno); + exit(1); } ret = execve(cmdName, paramArray, NULL); diff --git a/compat/posix/src/misc.c b/compat/posix/src/misc.c index 3950d95c..d3ae7e4d 100644 --- a/compat/posix/src/misc.c +++ b/compat/posix/src/misc.c @@ -40,7 +40,6 @@ #include "los_process_pri.h" #include "los_hw.h" -static struct rlimit g_defaultLimit = { 0 }; /* * Supply some suitable values for constants that may not be present * in all configurations. @@ -168,7 +167,10 @@ int getrlimit(int resource, struct rlimit *rlim) } if (resourceLimit == NULL) { - resourceLimit = &g_defaultLimit; + rlim->rlim_cur = 0; + rlim->rlim_max = 0; + + return 0; } SCHEDULER_LOCK(intSave); diff --git a/kernel/extended/hidumper/los_hidumper.c b/kernel/extended/hidumper/los_hidumper.c index be365ecd..ce86ec8a 100644 --- a/kernel/extended/hidumper/los_hidumper.c +++ b/kernel/extended/hidumper/los_hidumper.c @@ -319,7 +319,7 @@ static INT32 HiDumperIoctl(struct file *filep, INT32 cmd, unsigned long arg) break; case HIDUMPER_MEM_DATA: if (g_adapter.DumpMemData != NULL) { - g_adapter.DumpMemData((struct MemDumpParam *)arg); + g_adapter.DumpMemData((struct MemDumpParam *)((UINTPTR)arg)); } break; default: diff --git a/syscall/fs_syscall.c b/syscall/fs_syscall.c index ba787462..da90e293 100755 --- a/syscall/fs_syscall.c +++ b/syscall/fs_syscall.c @@ -2570,7 +2570,7 @@ int SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, ((struct timeval *)timeout)->tv_usec = timeout->tv_nsec / 1000; /* 1000, convert ns to us */ if (data != NULL) { - retVal = LOS_ArchCopyFromUser(&(setl.sig[0]), (int *)data[0], sizeof(sigset_t)); + retVal = LOS_ArchCopyFromUser(&(setl.sig[0]), (int *)((UINTPTR)data[0]), sizeof(sigset_t)); if (retVal != 0) { ret = -EFAULT; FREE_DUP(timeout); -- GitLab