fix:3.1代码检视问题

Signed-off-by: x_xiny <1301913191@qq.com>
Change-Id: Ib69620ebf3c139b0e69c3fb5347eaf54cab275de
This commit is contained in:
x_xiny 2022-03-19 19:04:33 +08:00
parent 98a82ba357
commit 4f12ab9a2a
13 changed files with 14 additions and 24 deletions

View File

@ -33,6 +33,7 @@
#define _LOS_ARCH_ATOMIC_H
#include "los_compiler.h"
#include "los_interrupt.h"
#ifdef __cplusplus
#if __cplusplus

View File

@ -223,13 +223,6 @@ u32_t lwip_ifconfig(int argc, const char **argv)
static struct ifconfig_option ifconfig_cmd;
err_t ret;
#if LWIP_STATS
u32_t stat_err_cnt;
u32_t stat_drop_cnt;
u32_t stat_rx_or_tx_cnt;
u32_t stat_rx_or_tx_bytes;
#endif
(void)memset_s(&ifconfig_cmd, sizeof(ifconfig_cmd), 0, sizeof(ifconfig_cmd));
if (sys_sem_new(&ifconfig_cmd.cb_completed, 0) != ERR_OK) {
PRINTK("%s: sys_sem_new fail\n", __FUNCTION__);

View File

@ -34,8 +34,6 @@
#include <lwip/snmp.h>
#include <lwip/etharp.h>
#include <lwip/sockets.h>
#include <lwip/snmp.h>
#include <lwip/etharp.h>
#include <lwip/ethip6.h>
#define LWIP_NETIF_HOSTNAME_DEFAULT "default"

View File

@ -37,7 +37,6 @@
#include <los_queue.h>
#include <los_sem.h>
#include <los_mux.h>
#include <los_tick.h>
#include <los_config.h>
#ifndef LOSCFG_KERNEL_SMP
@ -151,7 +150,7 @@ err_t sys_mbox_new(sys_mbox_t *mbox, int size)
}
CHAR qName[] = "lwIP";
UINT32 ret = LOS_QueueCreate(qName, (UINT16)size, mbox, 0, sizeof(void *));
UINT32 ret = LOS_QueueCreate(qName, (UINT16)size, (UINT32 *)mbox, 0, sizeof(void *));
switch (ret) {
case LOS_OK:
return ERR_OK;
@ -292,7 +291,7 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count)
return ERR_ARG;
}
UINT32 ret = LOS_SemCreate(count, sem);
UINT32 ret = LOS_SemCreate(count, (UINT32 *)(sem));
if (ret != LOS_OK) {
return ERR_ARG;
}
@ -367,7 +366,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
return ERR_ARG;
}
UINT32 ret = LOS_MuxCreate(mutex);
UINT32 ret = LOS_MuxCreate((UINT32 *)mutex);
if (ret != LOS_OK) {
return ERR_ARG;
}

View File

@ -203,14 +203,14 @@ STATIC CHAR *VfsNormalizeFullpath(const CHAR *directory, const CHAR *filename, C
CHAR *fullpath = NULL;
if (filename[0] != '/') {
/* not a absolute path */
/* not an absolute path */
fullpath = VfsNotAbsolutePath(directory, filename, pathname, namelen);
if (fullpath == NULL) {
return (CHAR *)NULL;
}
} else {
/* it's a absolute path, use it directly */
/* it's an absolute path, use it directly */
fullpath = strdup(filename); /* copy string */
if (fullpath == NULL) {

View File

@ -304,9 +304,9 @@ extern TRACE_EVENT_HOOK g_traceEventHook;
* <li>The first param is treat as key, keep at least this param if you want trace this event.</li>
* <li>All parameters were treated as UINTPTR.</li>
* </ul>
* eg. Trace a event as:
* eg. Trace an event as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId, taskStatus, oldPrio, newPrio
* eg. Not Trace a event as:
* eg. Not Trace an event as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio)
* eg. Trace only you need parmas as:
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId

View File

@ -35,7 +35,6 @@
#include "los_compiler.h"
#include "los_mux.h"
#include "errno.h"
#include "los_mux.h"
#include "los_debug.h"
#include "los_hook.h"
#include "los_sched.h"

View File

@ -492,7 +492,7 @@ LITE_OS_SEC_TEXT VOID *OsQueueMailAlloc(UINT32 queueID, VOID *mailPool, UINT32 t
runTsk->taskStatus &= (~OS_TASK_STATUS_TIMEOUT);
goto END;
} else {
/* When enters the current branch, means the current task already got a available membox,
/* When enters the current branch, means the current task already got an available membox,
* so the runTsk->msg can not be NULL.
*/
mem = runTsk->msg;

View File

@ -87,7 +87,7 @@ STATIC INLINE VOID OsTimeSliceUpdate(LosTaskCB *taskCB, UINT64 currTime)
STATIC INLINE VOID OsSchedSetNextExpireTime(UINT32 responseID, UINT64 taskEndTime)
{
UINT64 nextResponseTime = 0;
UINT64 nextResponseTime;
BOOL isTimeSlice = FALSE;
UINT64 currTime = OsGetCurrSchedTimeCycle();

View File

@ -68,7 +68,7 @@ static UINT32 Testcase(VOID)
g_testCount1 = 0;
// 1, Timeout interval of a periodic software timer.
ret = LOS_SwtmrCreate(1, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)Case2, &g_swtmrId1, &irqParam
ret = LOS_SwtmrCreate(1, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)Case2, &g_swtmrId1, (UINT32)&irqParam
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
#endif

View File

@ -82,14 +82,14 @@ static UINT32 Testcase(VOID)
TestHwiClear(HWI_NUM_TEST);
// 10, Timeout interval of a periodic software timer.
ret = LOS_SwtmrCreate(10, LOS_SWTMR_MODE_ONCE, (SWTMR_PROC_FUNC)Case3, &g_swtmrId1, &irqParam
ret = LOS_SwtmrCreate(10, LOS_SWTMR_MODE_ONCE, (SWTMR_PROC_FUNC)Case3, &g_swtmrId1, (UINT32)&irqParam
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
#endif
);
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
// 20, Timeout interval of a periodic software timer.
ret = LOS_SwtmrCreate(20, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)Case2, &g_swtmrId2, &irqParam
ret = LOS_SwtmrCreate(20, LOS_SWTMR_MODE_PERIOD, (SWTMR_PROC_FUNC)Case2, &g_swtmrId2, (UINT32)&irqParam
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
#endif

View File

@ -263,6 +263,7 @@ static void *SampleTcpClient()
/* send */
ret = memset_s(buf, sizeof(buf), 0, BUF_SIZE);
if (err != EOK) {
close(sfd);
return (void *)(intptr_t)ret;
}
(void)strcpy_s(buf, sizeof(buf), CLI_MSG);

View File

@ -52,7 +52,6 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_ErrHandle(CHAR *fileName,
UINT32 paraLen,
VOID *para)
{
if (g_userErrFunc.pfnHook != NULL) {
g_userErrFunc.pfnHook(fileName, lineNo, errorNo, paraLen, para);
}