From 3ce50a610c30b0d2c208900dc4ee8f89edb9f0ad Mon Sep 17 00:00:00 2001 From: yinjiaming Date: Mon, 7 Aug 2023 19:24:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E5=86=85=E6=A0=B8=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86=20=E5=86=85=E6=A0=B8?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E7=BB=8F=E5=B7=A5=E5=85=B7=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E6=9C=89=E5=91=8A=E8=AD=A6=EF=BC=8C=E7=8E=B0=E4=BA=88=E6=B8=85?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinjiaming Change-Id: I3bf6c421296dfccd9c78cc6af47dcb1879da5cea --- components/lms/los_lms.c | 3 ++- components/power/los_pm.c | 1 - testsuites/sample/posix/mqueue/It_posix_queue.h | 2 +- testsuites/sample/posix/mqueue/It_posix_queue_026.c | 2 +- testsuites/sample/posix/mqueue/It_posix_queue_043.c | 2 +- testsuites/unittest/posix/src/time/time_func_test_01.c | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/lms/los_lms.c b/components/lms/los_lms.c index 2528c6b6..fe96866a 100644 --- a/components/lms/los_lms.c +++ b/components/lms/los_lms.c @@ -162,7 +162,8 @@ UINT32 LOS_LmsCheckPoolAdd(const VOID *pool, UINT32 size) lmsPoolNode->shadowStart = (UINTPTR)poolAddr + realSize; lmsPoolNode->shadowSize = poolAddr + size - lmsPoolNode->shadowStart; /* init shadow value */ - (VOID)memset_s((VOID *)lmsPoolNode->shadowStart, lmsPoolNode->shadowSize, LMS_SHADOW_AFTERFREE_U8, lmsPoolNode->shadowSize); + (VOID)memset_s((VOID *)lmsPoolNode->shadowStart, lmsPoolNode->shadowSize, LMS_SHADOW_AFTERFREE_U8, + lmsPoolNode->shadowSize); LOS_ListAdd(&g_lmsCheckPoolList, &(lmsPoolNode->node)); diff --git a/components/power/los_pm.c b/components/power/los_pm.c index 3e2922c2..f13e80ac 100644 --- a/components/power/los_pm.c +++ b/components/power/los_pm.c @@ -147,7 +147,6 @@ STATIC BOOL OsPmTickTimerStop(LosPmCB *pm) realSleepTime = expireTime - currTime; sleepCycle = OS_SYS_CYCLE_TO_NS(realSleepTime, g_sysClock); sleepCycle = OS_SYS_NS_TO_CYCLE(sleepCycle, tickTimer->freq); - if (sleepCycle == 0) { pm->sysMode = LOS_SYS_NORMAL_SLEEP; return FALSE; diff --git a/testsuites/sample/posix/mqueue/It_posix_queue.h b/testsuites/sample/posix/mqueue/It_posix_queue.h index 2bd0b33d..897282d7 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue.h +++ b/testsuites/sample/posix/mqueue/It_posix_queue.h @@ -85,7 +85,7 @@ #define ICUNIT_GOTO_WITHIN_EQUAL(param, value1, value2, retcode, label) \ do { \ if ((param) < (value1) || (param) > (value2)) { \ - ICunitSaveErr(__LINE__, (iiUINT32)retcode); \ + ICunitSaveErr(__LINE__, (iiUINT32)(retcode)); \ goto label; \ } \ } while (0) diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_026.c b/testsuites/sample/posix/mqueue/It_posix_queue_026.c index 142b487d..c6dd19b7 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_026.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_026.c @@ -49,7 +49,7 @@ static VOID *PthreadF01(VOID *argument) g_testCount = 2; // 2, Init test count value. -EXIT1: +EXIT1: return NULL; EXIT2: g_testCount = 0; diff --git a/testsuites/sample/posix/mqueue/It_posix_queue_043.c b/testsuites/sample/posix/mqueue/It_posix_queue_043.c index cfd99054..2a09f5bc 100644 --- a/testsuites/sample/posix/mqueue/It_posix_queue_043.c +++ b/testsuites/sample/posix/mqueue/It_posix_queue_043.c @@ -50,7 +50,7 @@ static UINT32 Testcase(VOID) ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT); ret = mq_close(mqdes); - ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT2); + ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT2); ret = mq_unlink(mqname); ICUNIT_GOTO_EQUAL(ret, 0, ret, EXIT1); diff --git a/testsuites/unittest/posix/src/time/time_func_test_01.c b/testsuites/unittest/posix/src/time/time_func_test_01.c index 4ed86769..9c5f30d1 100644 --- a/testsuites/unittest/posix/src/time/time_func_test_01.c +++ b/testsuites/unittest/posix/src/time/time_func_test_01.c @@ -135,8 +135,8 @@ static char *TmToStr(const struct tm *timePtr, char *timeStr, unsigned len) if (timePtr == NULL || timeStr == NULL) { return ""; } - sprintf_s(timeStr, len, "%ld/%d/%d %02d:%02d:%02d WEEK(%d)", timePtr->tm_year + TM_BASE_YEAR, timePtr->tm_mon + 1, - timePtr->tm_mday, timePtr->tm_hour, timePtr->tm_min, timePtr->tm_sec, timePtr->tm_wday); + (VOID)sprintf_s(timeStr, len, "%ld/%d/%d %02d:%02d:%02d WEEK(%d)", timePtr->tm_year + TM_BASE_YEAR, + timePtr->tm_mon + 1, timePtr->tm_mday, timePtr->tm_hour, timePtr->tm_min, timePtr->tm_sec, timePtr->tm_wday); return timeStr; }