diff --git a/components/lms/los_lms.c b/components/lms/los_lms.c index 2528c6b67559cfc9db4a323339610ce9dd320046..fe96866a3d974c87f80b54d91ee75da8bab393e9 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 3e2922c2114ad316d7c3c37a4bc784fbd974a581..f13e80acc4c0ab27ee5bf1ce7af81857ee3e5ff5 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 2bd0b33d979f1ad689858cc80d6565bbf5b59e10..897282d7b2bbd85790a26cab2e82675f2f6f0192 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 142b487da2b928ef5210962ca667830b93b458bf..c6dd19b72861b5990a0c72b1383104f77b75fb28 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 cfd99054adfb8ffac24c29f1b70a803a2e6b6003..2a09f5bc2400e17c206d0111c5a96462431be7e0 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 4ed86769b38503ab65a1e300d42b3a10ee0c1c98..9c5f30d10695e5ff9d6ad20212ad1f23ee4f5d23 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; }