fix:3.1代码检视问题
Signed-off-by: x_xiny <1301913191@qq.com> Change-Id: Ib69620ebf3c139b0e69c3fb5347eaf54cab275de
This commit is contained in:
parent
98a82ba357
commit
4f12ab9a2a
|
@ -33,6 +33,7 @@
|
||||||
#define _LOS_ARCH_ATOMIC_H
|
#define _LOS_ARCH_ATOMIC_H
|
||||||
|
|
||||||
#include "los_compiler.h"
|
#include "los_compiler.h"
|
||||||
|
#include "los_interrupt.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#if __cplusplus
|
#if __cplusplus
|
||||||
|
|
|
@ -223,13 +223,6 @@ u32_t lwip_ifconfig(int argc, const char **argv)
|
||||||
static struct ifconfig_option ifconfig_cmd;
|
static struct ifconfig_option ifconfig_cmd;
|
||||||
err_t ret;
|
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));
|
(void)memset_s(&ifconfig_cmd, sizeof(ifconfig_cmd), 0, sizeof(ifconfig_cmd));
|
||||||
if (sys_sem_new(&ifconfig_cmd.cb_completed, 0) != ERR_OK) {
|
if (sys_sem_new(&ifconfig_cmd.cb_completed, 0) != ERR_OK) {
|
||||||
PRINTK("%s: sys_sem_new fail\n", __FUNCTION__);
|
PRINTK("%s: sys_sem_new fail\n", __FUNCTION__);
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
#include <lwip/snmp.h>
|
#include <lwip/snmp.h>
|
||||||
#include <lwip/etharp.h>
|
#include <lwip/etharp.h>
|
||||||
#include <lwip/sockets.h>
|
#include <lwip/sockets.h>
|
||||||
#include <lwip/snmp.h>
|
|
||||||
#include <lwip/etharp.h>
|
|
||||||
#include <lwip/ethip6.h>
|
#include <lwip/ethip6.h>
|
||||||
|
|
||||||
#define LWIP_NETIF_HOSTNAME_DEFAULT "default"
|
#define LWIP_NETIF_HOSTNAME_DEFAULT "default"
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
#include <los_queue.h>
|
#include <los_queue.h>
|
||||||
#include <los_sem.h>
|
#include <los_sem.h>
|
||||||
#include <los_mux.h>
|
#include <los_mux.h>
|
||||||
#include <los_tick.h>
|
|
||||||
#include <los_config.h>
|
#include <los_config.h>
|
||||||
|
|
||||||
#ifndef LOSCFG_KERNEL_SMP
|
#ifndef LOSCFG_KERNEL_SMP
|
||||||
|
@ -151,7 +150,7 @@ err_t sys_mbox_new(sys_mbox_t *mbox, int size)
|
||||||
}
|
}
|
||||||
|
|
||||||
CHAR qName[] = "lwIP";
|
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) {
|
switch (ret) {
|
||||||
case LOS_OK:
|
case LOS_OK:
|
||||||
return ERR_OK;
|
return ERR_OK;
|
||||||
|
@ -292,7 +291,7 @@ err_t sys_sem_new(sys_sem_t *sem, u8_t count)
|
||||||
return ERR_ARG;
|
return ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 ret = LOS_SemCreate(count, sem);
|
UINT32 ret = LOS_SemCreate(count, (UINT32 *)(sem));
|
||||||
if (ret != LOS_OK) {
|
if (ret != LOS_OK) {
|
||||||
return ERR_ARG;
|
return ERR_ARG;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +366,7 @@ err_t sys_mutex_new(sys_mutex_t *mutex)
|
||||||
return ERR_ARG;
|
return ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
UINT32 ret = LOS_MuxCreate(mutex);
|
UINT32 ret = LOS_MuxCreate((UINT32 *)mutex);
|
||||||
if (ret != LOS_OK) {
|
if (ret != LOS_OK) {
|
||||||
return ERR_ARG;
|
return ERR_ARG;
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,14 +203,14 @@ STATIC CHAR *VfsNormalizeFullpath(const CHAR *directory, const CHAR *filename, C
|
||||||
CHAR *fullpath = NULL;
|
CHAR *fullpath = NULL;
|
||||||
|
|
||||||
if (filename[0] != '/') {
|
if (filename[0] != '/') {
|
||||||
/* not a absolute path */
|
/* not an absolute path */
|
||||||
|
|
||||||
fullpath = VfsNotAbsolutePath(directory, filename, pathname, namelen);
|
fullpath = VfsNotAbsolutePath(directory, filename, pathname, namelen);
|
||||||
if (fullpath == NULL) {
|
if (fullpath == NULL) {
|
||||||
return (CHAR *)NULL;
|
return (CHAR *)NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* it's a absolute path, use it directly */
|
/* it's an absolute path, use it directly */
|
||||||
|
|
||||||
fullpath = strdup(filename); /* copy string */
|
fullpath = strdup(filename); /* copy string */
|
||||||
if (fullpath == NULL) {
|
if (fullpath == NULL) {
|
||||||
|
|
|
@ -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>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>
|
* <li>All parameters were treated as UINTPTR.</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
* eg. Trace a event as:
|
* eg. Trace an event as:
|
||||||
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId, taskStatus, oldPrio, newPrio
|
* #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)
|
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio)
|
||||||
* eg. Trace only you need parmas as:
|
* eg. Trace only you need parmas as:
|
||||||
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId
|
* #define TASK_PRIOSET_PARAMS(taskId, taskStatus, oldPrio, newPrio) taskId
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "los_compiler.h"
|
#include "los_compiler.h"
|
||||||
#include "los_mux.h"
|
#include "los_mux.h"
|
||||||
#include "errno.h"
|
#include "errno.h"
|
||||||
#include "los_mux.h"
|
|
||||||
#include "los_debug.h"
|
#include "los_debug.h"
|
||||||
#include "los_hook.h"
|
#include "los_hook.h"
|
||||||
#include "los_sched.h"
|
#include "los_sched.h"
|
||||||
|
|
|
@ -492,7 +492,7 @@ LITE_OS_SEC_TEXT VOID *OsQueueMailAlloc(UINT32 queueID, VOID *mailPool, UINT32 t
|
||||||
runTsk->taskStatus &= (~OS_TASK_STATUS_TIMEOUT);
|
runTsk->taskStatus &= (~OS_TASK_STATUS_TIMEOUT);
|
||||||
goto END;
|
goto END;
|
||||||
} else {
|
} 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.
|
* so the runTsk->msg can not be NULL.
|
||||||
*/
|
*/
|
||||||
mem = runTsk->msg;
|
mem = runTsk->msg;
|
||||||
|
|
|
@ -87,7 +87,7 @@ STATIC INLINE VOID OsTimeSliceUpdate(LosTaskCB *taskCB, UINT64 currTime)
|
||||||
|
|
||||||
STATIC INLINE VOID OsSchedSetNextExpireTime(UINT32 responseID, UINT64 taskEndTime)
|
STATIC INLINE VOID OsSchedSetNextExpireTime(UINT32 responseID, UINT64 taskEndTime)
|
||||||
{
|
{
|
||||||
UINT64 nextResponseTime = 0;
|
UINT64 nextResponseTime;
|
||||||
BOOL isTimeSlice = FALSE;
|
BOOL isTimeSlice = FALSE;
|
||||||
|
|
||||||
UINT64 currTime = OsGetCurrSchedTimeCycle();
|
UINT64 currTime = OsGetCurrSchedTimeCycle();
|
||||||
|
|
|
@ -68,7 +68,7 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
g_testCount1 = 0;
|
g_testCount1 = 0;
|
||||||
// 1, Timeout interval of a periodic software timer.
|
// 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)
|
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
|
||||||
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -82,14 +82,14 @@ static UINT32 Testcase(VOID)
|
||||||
|
|
||||||
TestHwiClear(HWI_NUM_TEST);
|
TestHwiClear(HWI_NUM_TEST);
|
||||||
// 10, Timeout interval of a periodic software timer.
|
// 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)
|
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
|
||||||
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
ICUNIT_GOTO_EQUAL(ret, LOS_OK, ret, EXIT);
|
||||||
// 20, Timeout interval of a periodic software timer.
|
// 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)
|
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
|
||||||
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
, OS_SWTMR_ROUSES_ALLOW, OS_SWTMR_ALIGN_INSENSITIVE
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -263,6 +263,7 @@ static void *SampleTcpClient()
|
||||||
/* send */
|
/* send */
|
||||||
ret = memset_s(buf, sizeof(buf), 0, BUF_SIZE);
|
ret = memset_s(buf, sizeof(buf), 0, BUF_SIZE);
|
||||||
if (err != EOK) {
|
if (err != EOK) {
|
||||||
|
close(sfd);
|
||||||
return (void *)(intptr_t)ret;
|
return (void *)(intptr_t)ret;
|
||||||
}
|
}
|
||||||
(void)strcpy_s(buf, sizeof(buf), CLI_MSG);
|
(void)strcpy_s(buf, sizeof(buf), CLI_MSG);
|
||||||
|
|
|
@ -52,7 +52,6 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_ErrHandle(CHAR *fileName,
|
||||||
UINT32 paraLen,
|
UINT32 paraLen,
|
||||||
VOID *para)
|
VOID *para)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (g_userErrFunc.pfnHook != NULL) {
|
if (g_userErrFunc.pfnHook != NULL) {
|
||||||
g_userErrFunc.pfnHook(fileName, lineNo, errorNo, paraLen, para);
|
g_userErrFunc.pfnHook(fileName, lineNo, errorNo, paraLen, para);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue