fix:修复-Werror编译选项产生的告警

清理框架定义未使用告警,宏重定义,以及变量定义未使用等告警。

Close #I68RLA

Signed-off-by: liuwenxin <liuwenxin11@huawei.com>
This commit is contained in:
liuwenxin
2023-01-04 16:08:01 +08:00
parent f7af2cdf9b
commit 52bc16c3db
31 changed files with 49 additions and 134 deletions

View File

@@ -46,7 +46,7 @@ static VOID TaskF01(VOID)
ICUNIT_ASSERT_EQUAL_VOID(g_testAtomicID03, i, g_testAtomicID03);
ICUNIT_ASSERT_EQUAL_VOID(ret, g_testAtomicID03, ret);
LOS_AtomicAdd(&g_testCount, 1);
LOS_AtomicAdd((Atomic *)(&g_testCount), 1);
}
static UINT32 TestCase(VOID)

View File

@@ -33,7 +33,7 @@
#include "osTest.h"
#include "It_los_event.h"
static VOID TaskF01()
static VOID TaskF01(VOID)
{
UINT32 ret;

View File

@@ -47,6 +47,7 @@ static int g_uwIndex;
#else
#define TEST_MAX_NUMBER_HWI (OS_USER_HWI_MAX - HWI_NUM_INT0)
#define TEST_HWI_COUNT (TEST_MAX_NUMBER_HWI - 2)
#undef HWI_NUM_INT0
#define HWI_NUM_INT0 HWI_NUM_INT1
#endif

View File

@@ -43,6 +43,7 @@ static VOID HwiF01(VOID)
return;
}
#undef HWI_NUM_INT0
#define HWI_NUM_INT0 HWI_NUM_TEST1
static UINT32 Testcase(VOID)
{

View File

@@ -33,7 +33,7 @@
#include "los_timer.h"
#include "los_sched.h"
#define myprintf // printf
#define myprintf printf
#define TEST_LOOP 5
static EVENT_CB_S g_pmTestEvent;
static UINT32 g_taskID1, g_taskID2;

View File

@@ -36,6 +36,15 @@ EVENT_CB_S g_eventCB0;
EVENT_CB_S g_eventCB1;
EVENT_CB_S g_eventCB2;
EVENT_CB_S g_eventCB3;
UINT32 g_swtmrId1;
UINT32 g_swtmrId2;
UINT32 g_swtmrId3;
UINT32 g_swtmrCountA;
UINT32 g_swtmrCountB;
UINT32 g_swtmrCountC;
UINT32 g_uwsTick1;
UINT32 g_uwsTick2;
UINT32 g_uwsTick3;
VOID ItSuiteLosSwtmr(void)
{

View File

@@ -56,17 +56,17 @@ extern EVENT_CB_S g_eventCB3;
extern UINT32 g_idleTaskID;
static UINT32 g_swtmrId1;
static UINT32 g_swtmrId2;
static UINT32 g_swtmrId3;
extern UINT32 g_swtmrId1;
extern UINT32 g_swtmrId2;
extern UINT32 g_swtmrId3;
static UINT32 g_swtmrCountA;
static UINT32 g_swtmrCountB;
static UINT32 g_swtmrCountC;
extern UINT32 g_swtmrCountA;
extern UINT32 g_swtmrCountB;
extern UINT32 g_swtmrCountC;
static UINT32 g_uwsTick1;
static UINT32 g_uwsTick2;
static UINT32 g_uwsTick3;
extern UINT32 g_uwsTick1;
extern UINT32 g_uwsTick2;
extern UINT32 g_uwsTick3;
extern VOID LOS_GetCpuTick(UINT32 *puwCntHi, UINT32 *puwCntLo);
extern VOID ItSuiteLosSwtmr(VOID);

View File

@@ -48,7 +48,7 @@ static VOID Case1(UINT32 arg)
return;
}
static VOID Case2()
static VOID Case2(VOID)
{
UINT32 ret;

View File

@@ -44,7 +44,7 @@ static VOID Case1(UINT32 arg)
return;
}
static VOID Case2()
static VOID Case2(VOID)
{
UINT32 ret;
UINT32 uwloop = 1000;

View File

@@ -41,7 +41,7 @@ static VOID Case1(UINT32 arg)
g_testCount = 30;
}
static VOID Case2()
static VOID Case2(VOID)
{
// 10, Here, assert that g_testCount is equal to this .
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 10, g_testCount);
@@ -49,7 +49,7 @@ static VOID Case2()
g_testCount = 20;
}
static VOID Case3()
static VOID Case3(VOID)
{
// 10, Set the number to determine whether the process is as expected.
g_testCount = 10;

View File

@@ -51,7 +51,7 @@ EXIT:
LOS_TaskDelete(g_testTaskID01);
}
static VOID Case2()
static VOID Case2(VOID)
{
UINT32 ret;

View File

@@ -50,14 +50,14 @@ static VOID Case1(UINT32 arg)
g_testCount = 10;
}
static VOID Case2()
static VOID Case2(VOID)
{
// 20, Here, assert that g_testCount is equal to this .
ICUNIT_ASSERT_EQUAL_VOID(g_testCount, 20, g_testCount);
g_testCount++;
}
static VOID Case3()
static VOID Case3(VOID)
{
UINT32 index;

View File

@@ -33,7 +33,7 @@
#include "It_los_swtmr.h"
static VOID Case1()
static VOID Case1(VOID)
{
UINT32 ret;
@@ -43,7 +43,7 @@ static VOID Case1()
}
}
static VOID Case2()
static VOID Case2(VOID)
{
UINT32 ret;
@@ -53,7 +53,7 @@ static VOID Case2()
}
}
static VOID Case3()
static VOID Case3(VOID)
{
UINT32 ret;
@@ -64,7 +64,7 @@ static VOID Case3()
}
}
VOID Case4()
static VOID Case4(VOID)
{
UINT32 ret;
@@ -77,7 +77,7 @@ VOID Case4()
}
}
VOID Case5()
static VOID Case5(VOID)
{
UINT32 ret;
@@ -90,7 +90,7 @@ VOID Case5()
}
}
VOID Case6()
static VOID Case6(VOID)
{
UINT32 ret;