fix: 规范整改

Signed-off-by: zhushengle <zhushengle@huawei.com>
Change-Id: I7be78853291d53636fd199104b4c72bbab222bcd
This commit is contained in:
zhushengle 2022-03-19 15:26:10 +08:00
parent a42ba7aed6
commit a09d4882c4
42 changed files with 46 additions and 77 deletions

View File

@ -163,7 +163,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -40,14 +40,12 @@
#include "los_memory.h" #include "los_memory.h"
#include "los_membox.h" #include "los_membox.h"
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
#ifdef __ICCARM__ #ifdef __ICCARM__
#pragma location = ".data.vector" #pragma location = ".data.vector"
#elif defined(__CC_ARM) || defined(__GNUC__) #elif defined(__CC_ARM) || defined(__GNUC__)
#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN
LITE_OS_SEC_VEC LITE_OS_SEC_VEC
#endif #endif
/* * /* *
@ -198,7 +196,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -41,10 +41,8 @@
#include "los_membox.h" #include "los_membox.h"
#define DEF_HANDLER_START_INDEX 2 #define DEF_HANDLER_START_INDEX 2
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
@ -189,7 +187,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -41,11 +41,8 @@
#include "los_membox.h" #include "los_membox.h"
#define DEF_HANDLER_START_INDEX 2 #define DEF_HANDLER_START_INDEX 2
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* Hardware interrupt form mapping handling function array. * Hardware interrupt form mapping handling function array.

View File

@ -46,7 +46,7 @@ UINT32 g_intCount = 0;
/*lint -restore*/ /*lint -restore*/
#pragma location = ".data.vector" #pragma location = ".data.vector"
#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* hardware interrupt form mapping handling function array. * hardware interrupt form mapping handling function array.

View File

@ -46,7 +46,7 @@ UINT32 g_intCount = 0;
/*lint -restore*/ /*lint -restore*/
#pragma location = ".data.vector" #pragma location = ".data.vector"
#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* hardware interrupt form mapping handling function array. * hardware interrupt form mapping handling function array.

View File

@ -34,7 +34,7 @@
#include "los_config.h" #include "los_config.h"
#include "los_list.h" #include "los_list.h"
#pragma data_alignment=0x4 #pragma data_alignment = 0x4
STATIC UINT8 g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0}; STATIC UINT8 g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0};
STATIC LOS_DL_LIST g_secureHeapFreeList = {NULL, NULL}; STATIC LOS_DL_LIST g_secureHeapFreeList = {NULL, NULL};

View File

@ -40,11 +40,8 @@
#include "los_memory.h" #include "los_memory.h"
#include "los_membox.h" #include "los_membox.h"
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* Hardware interrupt form mapping handling function array. * Hardware interrupt form mapping handling function array.
@ -193,7 +190,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -41,13 +41,11 @@
#include "los_memory.h" #include "los_memory.h"
#include "los_membox.h" #include "los_membox.h"
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
#ifdef __ICCARM__ #ifdef __ICCARM__
#pragma location = ".data.vector" #pragma location = ".data.vector"
#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN
#elif defined(__CC_ARM) || defined(__GNUC__) #elif defined(__CC_ARM) || defined(__GNUC__)
LITE_OS_SEC_VEC LITE_OS_SEC_VEC
#endif #endif

View File

@ -40,10 +40,8 @@
#include "los_membox.h" #include "los_membox.h"
#define DEF_HANDLER_START_INDEX 2 #define DEF_HANDLER_START_INDEX 2
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
@ -193,7 +191,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -40,11 +40,8 @@
#include "los_memory.h" #include "los_memory.h"
#include "los_membox.h" #include "los_membox.h"
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* Hardware interrupt form mapping handling function array. * Hardware interrupt form mapping handling function array.
@ -188,7 +185,6 @@ inline UINT32 ArchIsIntActive(VOID)
Output : None Output : None
Return : None Return : None
**************************************************************************** */ **************************************************************************** */
/*lint -e529*/
LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID)
{ {
PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet());

View File

@ -41,12 +41,10 @@
#include "los_memory.h" #include "los_memory.h"
#include "los_membox.h" #include "los_membox.h"
/*lint -save -e40 -e522 -e533*/
UINT32 g_intCount = 0; UINT32 g_intCount = 0;
/*lint -restore*/
#pragma location = ".data.vector" #pragma location = ".data.vector"
#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN #pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN
/* * /* *
* @ingroup los_hwi * @ingroup los_hwi
* Hardware interrupt form mapping handling function array. * Hardware interrupt form mapping handling function array.

View File

@ -52,8 +52,8 @@ extern "C" {
#define CODE_SECTION_NAME ".text" #define CODE_SECTION_NAME ".text"
/* The default C stack section name is CSTACK */ /* The default C stack section name is CSTACK */
#define CSTACK_SECTION_NAME "CSTACK" #define CSTACK_SECTION_NAME "CSTACK"
#pragma section=CODE_SECTION_NAME #pragma section = CODE_SECTION_NAME
#pragma section=CSTACK_SECTION_NAME #pragma section = CSTACK_SECTION_NAME
/* Default only one code section. In fact, there may be more than one. /* Default only one code section. In fact, there may be more than one.
You can define more than one and redefine the OsStackDataIsCodeAddr function You can define more than one and redefine the OsStackDataIsCodeAddr function

View File

@ -73,8 +73,8 @@ const SymInfo symTableEnd __attribute__((section(".table.end"))) = {
.name = "end", .name = "end",
.addr = 0 .addr = 0
}; };
#pragma section=".TABLE.START" #pragma section = ".TABLE.START"
#pragma section=".table.end" #pragma section = ".table.end"
#elif defined(__CLANG_ARM) || defined(__GNUC__) #elif defined(__CLANG_ARM) || defined(__GNUC__)
/** /**
* Place instructions below in rodata segment of .ld linker file: * Place instructions below in rodata segment of .ld linker file:

View File

@ -55,7 +55,7 @@ STATIC ExcInfoArray g_excArray[OS_EXC_TYPE_MAX];
STATIC UINT32 OsExcSaveIntStatus(UINT32 type, VOID *arg) STATIC UINT32 OsExcSaveIntStatus(UINT32 type, VOID *arg)
{ {
UINT32 ret; errno_t ret;
UINTPTR excContentEnd = (UINTPTR)MAX_INT_INFO_SIZE + (UINTPTR)g_excContent; UINTPTR excContentEnd = (UINTPTR)MAX_INT_INFO_SIZE + (UINTPTR)g_excContent;
(VOID)arg; (VOID)arg;

View File

@ -1191,7 +1191,7 @@ int LOS_Ioctl(int fd, int req, ...)
ssize_t LOS_Readv(int fd, const struct iovec *iovBuf, int iovcnt) ssize_t LOS_Readv(int fd, const struct iovec *iovBuf, int iovcnt)
{ {
int i; int i;
int ret; errno_t ret;
char *buf = NULL; char *buf = NULL;
char *curBuf = NULL; char *curBuf = NULL;
char *readBuf = NULL; char *readBuf = NULL;
@ -1231,7 +1231,7 @@ ssize_t LOS_Readv(int fd, const struct iovec *iovBuf, int iovcnt)
size_t lenToRead = totalLen < bytesToRead ? totalLen : bytesToRead; size_t lenToRead = totalLen < bytesToRead ? totalLen : bytesToRead;
ret = memcpy_s(readBuf, bytesToRead, curBuf, lenToRead); ret = memcpy_s(readBuf, bytesToRead, curBuf, lenToRead);
if (ret != LOS_OK) { if (ret != EOK) {
free(buf); free(buf);
return LOS_NOK; return LOS_NOK;
} }
@ -1248,7 +1248,7 @@ ssize_t LOS_Readv(int fd, const struct iovec *iovBuf, int iovcnt)
ssize_t LOS_Writev(int fd, const struct iovec *iovBuf, int iovcnt) ssize_t LOS_Writev(int fd, const struct iovec *iovBuf, int iovcnt)
{ {
int i; int i;
int ret; errno_t ret;
char *buf = NULL; char *buf = NULL;
char *curBuf = NULL; char *curBuf = NULL;
char *writeBuf = NULL; char *writeBuf = NULL;
@ -1285,7 +1285,7 @@ ssize_t LOS_Writev(int fd, const struct iovec *iovBuf, int iovcnt)
continue; continue;
} }
ret = memcpy_s(curBuf, totalLen, writeBuf, bytesToWrite); ret = memcpy_s(curBuf, totalLen, writeBuf, bytesToWrite);
if (ret != LOS_OK) { if (ret != EOK) {
free(buf); free(buf);
return LOS_NOK; return LOS_NOK;
} }

View File

@ -54,7 +54,7 @@ void __DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp
} }
#else /* IAR version 8 or above. */ #else /* IAR version 8 or above. */
#pragma section="__iar_tls$$DATA" #pragma section = "__iar_tls$$DATA"
void *__aeabi_read_tp(void) void *__aeabi_read_tp(void)
{ {
if (!LOS_TaskIsRunning()) { if (!LOS_TaskIsRunning()) {

View File

@ -124,7 +124,7 @@ int ip6addr_aton(const char *cp, ip6_addr_t *addr)
u16_t *a16 = (u16_t *)addr->addr; u16_t *a16 = (u16_t *)addr->addr;
int squash_pos = ipv6_blocks; int squash_pos = ipv6_blocks;
int i; int i;
const char *sc = cp; const unsigned char *sc = (const unsigned char *)cp;
const char *ss = cp-1; const char *ss = cp-1;
for (; ; sc++) { for (; ; sc++) {

View File

@ -217,7 +217,6 @@ void lwip_ifconfig_show_internal(void *arg)
sys_sem_signal(&ifconfig_cmd->cb_completed); sys_sem_signal(&ifconfig_cmd->cb_completed);
} }
/*lint -e838 -e438*/
u32_t lwip_ifconfig(int argc, const char **argv) u32_t lwip_ifconfig(int argc, const char **argv)
{ {
static struct ifconfig_option ifconfig_cmd; static struct ifconfig_option ifconfig_cmd;
@ -252,7 +251,6 @@ u32_t lwip_ifconfig(int argc, const char **argv)
return 0; return 0;
} }
/*lint +e838 +e438*/
#if LWIP_DNS #if LWIP_DNS
#ifndef LWIP_TESTBED #ifndef LWIP_TESTBED
@ -278,7 +276,7 @@ struct hostent *gethostnameinfo(const char *host, char *tmphstbuf, size_t hstbuf
LWIP_STATIC unsigned int get_hostip(const char *hname) LWIP_STATIC unsigned int get_hostip(const char *hname)
{ {
unsigned int ip = 0; unsigned int ip = 0;
int ret; errno_t ret;
const size_t hstbuflen = 1024; const size_t hstbuflen = 1024;
char *tmphstbuf = NULL; char *tmphstbuf = NULL;
@ -292,7 +290,7 @@ LWIP_STATIC unsigned int get_hostip(const char *hname)
return 0; return 0;
} }
ret = memcpy_s(&ip, sizeof(ip), pent->h_addr, 4); ret = memcpy_s(&ip, sizeof(ip), pent->h_addr, 4);
if (ret != 0) { if (ret != EOK) {
free(tmphstbuf); free(tmphstbuf);
return 0; return 0;
} }

View File

@ -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"

View File

@ -33,7 +33,6 @@
#include <lwip/sys.h> #include <lwip/sys.h>
#include <lwip/debug.h> #include <lwip/debug.h>
#include <los_task.h> #include <los_task.h>
#include <los_tick.h>
#include <los_queue.h> #include <los_queue.h>
#include <los_sem.h> #include <los_sem.h>
#include <los_mux.h> #include <los_mux.h>
@ -202,6 +201,8 @@ err_t sys_mbox_trypost(sys_mbox_t *mbox, void *msg)
err_t sys_mbox_trypost_fromisr(sys_mbox_t *mbox, void *msg) err_t sys_mbox_trypost_fromisr(sys_mbox_t *mbox, void *msg)
{ {
(void)mbox;
(void)msg;
return ERR_ARG; return ERR_ARG;
} }

View File

@ -217,7 +217,6 @@ static void ParsePackageIpUdp(struct netif *netif, struct pbuf *btBuf)
ICUNIT_ASSERT_EQUAL(dataLen, strlen(MSG), 4); ICUNIT_ASSERT_EQUAL(dataLen, strlen(MSG), 4);
LogPrintln("================================="); LogPrintln("=================================");
// 回应udp报文
ReplayUdpTask(); ReplayUdpTask();
} }
@ -229,7 +228,6 @@ static void ParsePackageEthernet(struct netif *netif, struct pbuf *p)
ethhdr = (struct eth_hdr *)p->payload; ethhdr = (struct eth_hdr *)p->payload;
u16_t type = ethhdr->type; u16_t type = ethhdr->type;
LogPrintln("ParsePackageEthernet type is %d", type);
switch (type) { switch (type) {
#if LWIP_IPV4 && LWIP_ARP #if LWIP_IPV4 && LWIP_ARP
/* IP packet? */ /* IP packet? */
@ -322,7 +320,6 @@ static void UdpTestNetifTask(void *p)
struct ifreq nif; struct ifreq nif;
int ret; int ret;
// 注册网卡
btProxyNf = CreateBtNetIf(); btProxyNf = CreateBtNetIf();
/* socket creation */ /* socket creation */
@ -335,7 +332,6 @@ static void UdpTestNetifTask(void *p)
ret = bind(sfd, (struct sockaddr*)&srvAddr, sizeof(srvAddr)); ret = bind(sfd, (struct sockaddr*)&srvAddr, sizeof(srvAddr));
LWIP_ASSERT("socket invalid param.", ret == 0); LWIP_ASSERT("socket invalid param.", ret == 0);
/* 指定网卡接口 */
char *inface = NETIF_NAME_BT; char *inface = NETIF_NAME_BT;
(void)strcpy_s(nif.ifr_name, sizeof(nif.ifr_name), inface); (void)strcpy_s(nif.ifr_name, sizeof(nif.ifr_name), inface);
if (setsockopt(sfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&nif, sizeof(nif)) < 0) { if (setsockopt(sfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&nif, sizeof(nif)) < 0) {
@ -393,7 +389,6 @@ static void ArpPackageProc(struct netif *netif, struct pbuf *p)
return; return;
} }
// 回应arp报文
ReplayArpTask(); ReplayArpTask();
} }

1
components/shell/src/base/shcmd.c Executable file → Normal file
View File

@ -98,6 +98,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
PRINTK("malloc failure in %s[%d]", __FUNCTION__, __LINE__); PRINTK("malloc failure in %s[%d]", __FUNCTION__, __LINE__);
return (UINT32)OS_ERROR; return (UINT32)OS_ERROR;
} }
(VOID)memset_s(output, len + 1, 0, len + 1);
/* Backup the 'output' start address */ /* Backup the 'output' start address */
outputBak = output; outputBak = output;
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */ /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */

0
components/shell/src/base/shcmdparse.c Executable file → Normal file
View File

0
components/shell/src/base/show.c Executable file → Normal file
View File

0
components/shell/src/cmds/date_shell.c Executable file → Normal file
View File

0
components/shell/src/cmds/fullpath.c Executable file → Normal file
View File

0
components/shell/src/cmds/mempt_shellcmd.c Executable file → Normal file
View File

0
components/shell/src/cmds/shell_shellcmd.c Executable file → Normal file
View File

0
components/shell/src/cmds/task_shellcmd.c Executable file → Normal file
View File

0
components/shell/src/cmds/vfs_shellcmd.c Executable file → Normal file
View File

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

View File

@ -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"

View File

@ -120,7 +120,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_QueueCreate(const CHAR *queueName,
/* Memory allocation is time-consuming, to shorten the time of disable interrupt, /* Memory allocation is time-consuming, to shorten the time of disable interrupt,
move the memory allocation to here. */ move the memory allocation to here. */
queue = (UINT8 *)LOS_MemAlloc(m_aucSysMem0, len * msgSize); queue = (UINT8 *)LOS_MemAlloc(m_aucSysMem0, (UINT32)len * msgSize);
if (queue == NULL) { if (queue == NULL) {
return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY; return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY;
} }

View File

@ -35,7 +35,7 @@ STATIC UINT32 TestCase(VOID)
{ {
INT32 ret; INT32 ret;
VOID *handle = NULL; VOID *handle = NULL;
INT32 (*func)(INT32 ,INT32) = NULL; INT32 (*func)(INT32, INT32) = NULL;
handle = (VOID *)LOS_SoLoad(NULL, NULL); handle = (VOID *)LOS_SoLoad(NULL, NULL);
ICUNIT_ASSERT_EQUAL(handle, NULL, handle); ICUNIT_ASSERT_EQUAL(handle, NULL, handle);

View File

@ -96,9 +96,9 @@ STATIC UINT32 TestCase(VOID)
ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_LMK_RESTORE_NOT_NEEDED, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_LMK_RESTORE_NOT_NEEDED, ret);
firstOpsNode.freeMem = release_OK; firstOpsNode.freeMem = release_OK;
firstOpsNode.restoreTask =restore_OK; firstOpsNode.restoreTask = restore_OK;
anotherOpsNode.freeMem = release_OK; anotherOpsNode.freeMem = release_OK;
anotherOpsNode.restoreTask =restore_OK; anotherOpsNode.restoreTask = restore_OK;
ret = LOS_LmkTasksKill(); ret = LOS_LmkTasksKill();
ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret);
ret = LOS_LmkTasksRestore(); ret = LOS_LmkTasksRestore();

View File

@ -303,7 +303,7 @@ static UINT32 TcpFun(VOID)
stTask1.uwResved = LOS_TASK_STATUS_DETACHED; stTask1.uwResved = LOS_TASK_STATUS_DETACHED;
(void)LOS_TaskCreate(&g_testTaskID01, &stTask1); (void)LOS_TaskCreate(&g_testTaskID01, &stTask1);
} }
}; }
DT_Clear(g_element); DT_Clear(g_element);
CLOSE_Log(); CLOSE_Log();

View File

@ -57,6 +57,8 @@ void ReallocFuzzTest(void)
return; return;
} }
(void)memset_s(source, TEST_BUF_LEN, 0, TEST_BUF_LEN);
INIT_FuzzEnvironment(); INIT_FuzzEnvironment();
CreatPrecondForQueue(); CreatPrecondForQueue();
for (int i = 0; i < CYCLE_TOTAL_TIMES; i++) { for (int i = 0; i < CYCLE_TOTAL_TIMES; i++) {

View File

@ -268,7 +268,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest
mem = malloc(mlen); mem = malloc(mlen);
TEST_ASSERT_NOT_NULL(mem); TEST_ASSERT_NOT_NULL(mem);
memset(mem, testChar, mlen); (void)memset_s(mem, mlen, testChar, mlen);
rlen = rand() % (1024) + mlen; rlen = rand() % (1024) + mlen;
char *mem1 = realloc(mem, rlen); char *mem1 = realloc(mem, rlen);
if (mem1 == NULL) { if (mem1 == NULL) {

View File

@ -248,7 +248,7 @@ LITE_OS_SEC_ALW_INLINE STATIC_INLINE BOOL LOS_ListEmpty(LOS_DL_LIST *node)
* <ul><li>los_list.h: the header file that contains the API declaration.</li></ul> * <ul><li>los_list.h: the header file that contains the API declaration.</li></ul>
* @see * @see
*/ */
#define LOS_OFF_SET_OF(type, member) ((UINT32)&(((type *)0)->member)) /*lint -e(413) */ #define LOS_OFF_SET_OF(type, member) ((UINT32)&(((type *)0)->member))
/** /**
* @ingroup los_list * @ingroup los_list