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; }