diff --git a/arch/arm/arm9/gcc/los_interrupt.c b/arch/arm/arm9/gcc/los_interrupt.c index fd6d48cc..a82fe435 100644 --- a/arch/arm/arm9/gcc/los_interrupt.c +++ b/arch/arm/arm9/gcc/los_interrupt.c @@ -163,7 +163,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); diff --git a/arch/arm/cortex-m3/keil/los_interrupt.c b/arch/arm/cortex-m3/keil/los_interrupt.c index 391cb7a4..26e3de7b 100644 --- a/arch/arm/cortex-m3/keil/los_interrupt.c +++ b/arch/arm/cortex-m3/keil/los_interrupt.c @@ -40,14 +40,12 @@ #include "los_memory.h" #include "los_membox.h" -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ #ifdef __ICCARM__ #pragma location = ".data.vector" #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 #endif /* * @@ -198,7 +196,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); @@ -602,7 +599,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c b/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c index 1ee9c848..d8dd8db8 100644 --- a/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c +++ b/arch/arm/cortex-m33/gcc/NTZ/los_interrupt.c @@ -41,10 +41,8 @@ #include "los_membox.h" #define DEF_HANDLER_START_INDEX 2 -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ /* * * @ingroup los_hwi @@ -189,7 +187,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); @@ -593,7 +590,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c index 5339e7eb..f0e54875 100644 --- a/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c +++ b/arch/arm/cortex-m33/gcc/TZ/non_secure/los_interrupt.c @@ -41,11 +41,8 @@ #include "los_membox.h" #define DEF_HANDLER_START_INDEX 2 -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ - /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. @@ -593,7 +590,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c b/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c index 8858df67..59b86aeb 100644 --- a/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c +++ b/arch/arm/cortex-m33/iar/NTZ/los_interrupt.c @@ -46,7 +46,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN +#pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * hardware interrupt form mapping handling function array. diff --git a/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c b/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c index 8858df67..59b86aeb 100644 --- a/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c +++ b/arch/arm/cortex-m33/iar/TZ/non_secure/los_interrupt.c @@ -46,7 +46,7 @@ UINT32 g_intCount = 0; /*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN +#pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * hardware interrupt form mapping handling function array. diff --git a/arch/arm/cortex-m33/iar/TZ/secure/los_secure_heap.c b/arch/arm/cortex-m33/iar/TZ/secure/los_secure_heap.c index 2c7f15ae..7f0077e0 100644 --- a/arch/arm/cortex-m33/iar/TZ/secure/los_secure_heap.c +++ b/arch/arm/cortex-m33/iar/TZ/secure/los_secure_heap.c @@ -34,7 +34,7 @@ #include "los_config.h" #include "los_list.h" -#pragma data_alignment=0x4 +#pragma data_alignment = 0x4 STATIC UINT8 g_secureHeap[LOSCFG_SECURE_HEAP_SIZE] = {0}; STATIC LOS_DL_LIST g_secureHeapFreeList = {NULL, NULL}; diff --git a/arch/arm/cortex-m4/gcc/los_interrupt.c b/arch/arm/cortex-m4/gcc/los_interrupt.c index c6a09db2..a71c31d7 100644 --- a/arch/arm/cortex-m4/gcc/los_interrupt.c +++ b/arch/arm/cortex-m4/gcc/los_interrupt.c @@ -40,11 +40,8 @@ #include "los_memory.h" #include "los_membox.h" -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ - /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. @@ -193,7 +190,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); @@ -607,7 +603,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m4/iar/los_interrupt.c b/arch/arm/cortex-m4/iar/los_interrupt.c index f589c996..3ab655f7 100644 --- a/arch/arm/cortex-m4/iar/los_interrupt.c +++ b/arch/arm/cortex-m4/iar/los_interrupt.c @@ -41,13 +41,11 @@ #include "los_memory.h" #include "los_membox.h" -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ #ifdef __ICCARM__ #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__) LITE_OS_SEC_VEC #endif @@ -603,7 +601,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m55/gcc/NTZ/los_interrupt.c b/arch/arm/cortex-m55/gcc/NTZ/los_interrupt.c index b468ee73..b7572b9b 100644 --- a/arch/arm/cortex-m55/gcc/NTZ/los_interrupt.c +++ b/arch/arm/cortex-m55/gcc/NTZ/los_interrupt.c @@ -40,10 +40,8 @@ #include "los_membox.h" #define DEF_HANDLER_START_INDEX 2 -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ /* * * @ingroup los_hwi @@ -193,7 +191,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); diff --git a/arch/arm/cortex-m7/gcc/los_interrupt.c b/arch/arm/cortex-m7/gcc/los_interrupt.c index a0a944e2..bfff8de4 100644 --- a/arch/arm/cortex-m7/gcc/los_interrupt.c +++ b/arch/arm/cortex-m7/gcc/los_interrupt.c @@ -40,11 +40,8 @@ #include "los_memory.h" #include "los_membox.h" -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ - /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. @@ -188,7 +185,6 @@ inline UINT32 ArchIsIntActive(VOID) Output : None Return : None **************************************************************************** */ -/*lint -e529*/ LITE_OS_SEC_TEXT_MINOR VOID HalHwiDefaultHandler(VOID) { PRINT_ERR("%s irqnum:%u\n", __FUNCTION__, HwiNumGet()); @@ -592,7 +588,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ #ifdef LOSCFG_ARCH_UNALIGNED_EXC *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/arch/arm/cortex-m7/iar/los_interrupt.c b/arch/arm/cortex-m7/iar/los_interrupt.c index c930a7d5..36795fe0 100644 --- a/arch/arm/cortex-m7/iar/los_interrupt.c +++ b/arch/arm/cortex-m7/iar/los_interrupt.c @@ -41,12 +41,10 @@ #include "los_memory.h" #include "los_membox.h" -/*lint -save -e40 -e522 -e533*/ UINT32 g_intCount = 0; -/*lint -restore*/ #pragma location = ".data.vector" -#pragma data_alignment=LOSCFG_ARCH_HWI_VECTOR_ALIGN +#pragma data_alignment = LOSCFG_ARCH_HWI_VECTOR_ALIGN /* * * @ingroup los_hwi * Hardware interrupt form mapping handling function array. @@ -599,7 +597,7 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID) /* Enable USGFAULT, BUSFAULT, MEMFAULT */ *(volatile UINT32 *)OS_NVIC_SHCSR |= (USGFAULT | BUSFAULT | MEMFAULT); - + /* Enable DIV 0 and unaligned exception */ *(volatile UINT32 *)OS_NVIC_CCR |= (DIV0FAULT | UNALIGNFAULT); diff --git a/components/backtrace/los_backtrace.h b/components/backtrace/los_backtrace.h index 1ed52f13..87c8c612 100644 --- a/components/backtrace/los_backtrace.h +++ b/components/backtrace/los_backtrace.h @@ -52,8 +52,8 @@ extern "C" { #define CODE_SECTION_NAME ".text" /* The default C stack section name is CSTACK */ #define CSTACK_SECTION_NAME "CSTACK" -#pragma section=CODE_SECTION_NAME -#pragma section=CSTACK_SECTION_NAME +#pragma section = CODE_SECTION_NAME +#pragma section = CSTACK_SECTION_NAME /* Default only one code section. In fact, there may be more than one. You can define more than one and redefine the OsStackDataIsCodeAddr function diff --git a/components/dynlink/los_dynlink.c b/components/dynlink/los_dynlink.c index daeba81f..cfcae348 100644 --- a/components/dynlink/los_dynlink.c +++ b/components/dynlink/los_dynlink.c @@ -73,8 +73,8 @@ const SymInfo symTableEnd __attribute__((section(".table.end"))) = { .name = "end", .addr = 0 }; -#pragma section=".TABLE.START" -#pragma section=".table.end" +#pragma section = ".TABLE.START" +#pragma section = ".table.end" #elif defined(__CLANG_ARM) || defined(__GNUC__) /** * Place instructions below in rodata segment of .ld linker file: diff --git a/components/exchook/los_exc_info.c b/components/exchook/los_exc_info.c index a4ab3452..334d852a 100644 --- a/components/exchook/los_exc_info.c +++ b/components/exchook/los_exc_info.c @@ -55,7 +55,7 @@ STATIC ExcInfoArray g_excArray[OS_EXC_TYPE_MAX]; STATIC UINT32 OsExcSaveIntStatus(UINT32 type, VOID *arg) { - UINT32 ret; + errno_t ret; UINTPTR excContentEnd = (UINTPTR)MAX_INT_INFO_SIZE + (UINTPTR)g_excContent; (VOID)arg; diff --git a/components/fs/vfs/vfs_fs.c b/components/fs/vfs/vfs_fs.c index 2b6d36e6..fd4e78f6 100644 --- a/components/fs/vfs/vfs_fs.c +++ b/components/fs/vfs/vfs_fs.c @@ -1191,7 +1191,7 @@ int LOS_Ioctl(int fd, int req, ...) ssize_t LOS_Readv(int fd, const struct iovec *iovBuf, int iovcnt) { int i; - int ret; + errno_t ret; char *buf = NULL; char *curBuf = 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; ret = memcpy_s(readBuf, bytesToRead, curBuf, lenToRead); - if (ret != LOS_OK) { + if (ret != EOK) { free(buf); 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) { int i; - int ret; + errno_t ret; char *buf = NULL; char *curBuf = NULL; char *writeBuf = NULL; @@ -1285,7 +1285,7 @@ ssize_t LOS_Writev(int fd, const struct iovec *iovBuf, int iovcnt) continue; } ret = memcpy_s(curBuf, totalLen, writeBuf, bytesToWrite); - if (ret != LOS_OK) { + if (ret != EOK) { free(buf); return LOS_NOK; } diff --git a/components/iar_tls/los_iar_tls.c b/components/iar_tls/los_iar_tls.c index 03db7ebd..3f94cf18 100644 --- a/components/iar_tls/los_iar_tls.c +++ b/components/iar_tls/los_iar_tls.c @@ -54,7 +54,7 @@ void __DLIB_TLS_MEMORY *__iar_dlib_perthread_access(void _DLIB_TLS_MEMORY *symbp } #else /* IAR version 8 or above. */ -#pragma section="__iar_tls$$DATA" +#pragma section = "__iar_tls$$DATA" void *__aeabi_read_tp(void) { if (!LOS_TaskIsRunning()) { @@ -211,4 +211,4 @@ void __iar_file_Mtxunlock(__iar_Rmtx *m) if (LOS_TaskIsRunning()) { (void)LOS_MuxPost(muxInfo->muxID); } -} \ No newline at end of file +} diff --git a/components/net/lwip-2.1/enhancement/src/fixme.c b/components/net/lwip-2.1/enhancement/src/fixme.c index 19e83eb9..6e33765b 100644 --- a/components/net/lwip-2.1/enhancement/src/fixme.c +++ b/components/net/lwip-2.1/enhancement/src/fixme.c @@ -124,7 +124,7 @@ int ip6addr_aton(const char *cp, ip6_addr_t *addr) u16_t *a16 = (u16_t *)addr->addr; int squash_pos = ipv6_blocks; int i; - const char *sc = cp; + const unsigned char *sc = (const unsigned char *)cp; const char *ss = cp-1; for (; ; sc++) { diff --git a/components/net/lwip-2.1/porting/src/api_shell.c b/components/net/lwip-2.1/porting/src/api_shell.c index d72775e6..a4fa779c 100644 --- a/components/net/lwip-2.1/porting/src/api_shell.c +++ b/components/net/lwip-2.1/porting/src/api_shell.c @@ -217,7 +217,6 @@ void lwip_ifconfig_show_internal(void *arg) sys_sem_signal(&ifconfig_cmd->cb_completed); } -/*lint -e838 -e438*/ u32_t lwip_ifconfig(int argc, const char **argv) { static struct ifconfig_option ifconfig_cmd; @@ -252,7 +251,6 @@ u32_t lwip_ifconfig(int argc, const char **argv) return 0; } -/*lint +e838 +e438*/ #if LWIP_DNS #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) { unsigned int ip = 0; - int ret; + errno_t ret; const size_t hstbuflen = 1024; char *tmphstbuf = NULL; @@ -292,7 +290,7 @@ LWIP_STATIC unsigned int get_hostip(const char *hname) return 0; } ret = memcpy_s(&ip, sizeof(ip), pent->h_addr, 4); - if (ret != 0) { + if (ret != EOK) { free(tmphstbuf); return 0; } diff --git a/components/net/lwip-2.1/porting/src/driverif.c b/components/net/lwip-2.1/porting/src/driverif.c index d16ba5cc..f1d8abe5 100644 --- a/components/net/lwip-2.1/porting/src/driverif.c +++ b/components/net/lwip-2.1/porting/src/driverif.c @@ -34,8 +34,6 @@ #include #include #include -#include -#include #include #define LWIP_NETIF_HOSTNAME_DEFAULT "default" diff --git a/components/net/lwip-2.1/porting/src/sys_arch.c b/components/net/lwip-2.1/porting/src/sys_arch.c index 35661397..1efdafc9 100644 --- a/components/net/lwip-2.1/porting/src/sys_arch.c +++ b/components/net/lwip-2.1/porting/src/sys_arch.c @@ -33,7 +33,6 @@ #include #include #include -#include #include #include #include @@ -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) { + (void)mbox; + (void)msg; return ERR_ARG; } diff --git a/components/net/test/net_socket_test_011.c b/components/net/test/net_socket_test_011.c index 32174654..57884381 100644 --- a/components/net/test/net_socket_test_011.c +++ b/components/net/test/net_socket_test_011.c @@ -217,7 +217,6 @@ static void ParsePackageIpUdp(struct netif *netif, struct pbuf *btBuf) ICUNIT_ASSERT_EQUAL(dataLen, strlen(MSG), 4); LogPrintln("================================="); - // 回应udp报文 ReplayUdpTask(); } @@ -229,7 +228,6 @@ static void ParsePackageEthernet(struct netif *netif, struct pbuf *p) ethhdr = (struct eth_hdr *)p->payload; u16_t type = ethhdr->type; - LogPrintln("ParsePackageEthernet type is %d", type); switch (type) { #if LWIP_IPV4 && LWIP_ARP /* IP packet? */ @@ -322,7 +320,6 @@ static void UdpTestNetifTask(void *p) struct ifreq nif; int ret; - // 注册网卡 btProxyNf = CreateBtNetIf(); /* socket creation */ @@ -335,7 +332,6 @@ static void UdpTestNetifTask(void *p) ret = bind(sfd, (struct sockaddr*)&srvAddr, sizeof(srvAddr)); LWIP_ASSERT("socket invalid param.", ret == 0); - /* 指定网卡接口 */ char *inface = NETIF_NAME_BT; (void)strcpy_s(nif.ifr_name, sizeof(nif.ifr_name), inface); 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; } - // 回应arp报文 ReplayArpTask(); } @@ -446,4 +441,4 @@ static void ReplayArpTask() ret = sys_thread_new("replay_arp", ReplayArp, NULL, STACK_TEST_SIZE, TCPIP_THREAD_PRIO); ICUNIT_ASSERT_NOT_EQUAL(ret, -1, 23); -} \ No newline at end of file +} diff --git a/components/shell/src/base/shcmd.c b/components/shell/src/base/shcmd.c old mode 100755 new mode 100644 index 703065e1..79d0751f --- a/components/shell/src/base/shcmd.c +++ b/components/shell/src/base/shcmd.c @@ -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__); return (UINT32)OS_ERROR; } + (VOID)memset_s(output, len + 1, 0, len + 1); /* Backup the 'output' start address */ outputBak = output; /* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */ diff --git a/components/shell/src/base/shcmdparse.c b/components/shell/src/base/shcmdparse.c old mode 100755 new mode 100644 diff --git a/components/shell/src/base/show.c b/components/shell/src/base/show.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/date_shell.c b/components/shell/src/cmds/date_shell.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/fullpath.c b/components/shell/src/cmds/fullpath.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/mempt_shellcmd.c b/components/shell/src/cmds/mempt_shellcmd.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/shell_shellcmd.c b/components/shell/src/cmds/shell_shellcmd.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/task_shellcmd.c b/components/shell/src/cmds/task_shellcmd.c old mode 100755 new mode 100644 diff --git a/components/shell/src/cmds/vfs_shellcmd.c b/components/shell/src/cmds/vfs_shellcmd.c old mode 100755 new mode 100644 diff --git a/components/trace/los_trace.h b/components/trace/los_trace.h index fb089117..24812697 100644 --- a/components/trace/los_trace.h +++ b/components/trace/los_trace.h @@ -304,9 +304,9 @@ extern TRACE_EVENT_HOOK g_traceEventHook; *
  • The first param is treat as key, keep at least this param if you want trace this event.
  • *
  • All parameters were treated as UINTPTR.
  • * - * 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 diff --git a/kal/posix/src/pthread_mutex.c b/kal/posix/src/pthread_mutex.c index bda54788..ea90b76f 100644 --- a/kal/posix/src/pthread_mutex.c +++ b/kal/posix/src/pthread_mutex.c @@ -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" diff --git a/kernel/src/los_queue.c b/kernel/src/los_queue.c index 5d64248c..acb94bbc 100644 --- a/kernel/src/los_queue.c +++ b/kernel/src/los_queue.c @@ -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, 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) { return LOS_ERRNO_QUEUE_CREATE_NO_MEMORY; } diff --git a/testsuites/sample/kernel/atomic/it_los_atomic_011.c b/testsuites/sample/kernel/atomic/it_los_atomic_011.c index 2decabb8..f48156ce 100644 --- a/testsuites/sample/kernel/atomic/it_los_atomic_011.c +++ b/testsuites/sample/kernel/atomic/it_los_atomic_011.c @@ -43,13 +43,13 @@ static VOID TaskF01(VOID) Atomic atomicTestCounter = 0; INT32 readCounter = 0; INT32 atomicRet = 0; - + Atomic64 atomic64TestCounter = 0; INT64 read64Counter = 0; INT64 atomic64Ret = 0; ICUNIT_ASSERT_EQUAL(g_testCount, 0, g_testCount); - + atomicTestCounter = 0x88888888; LOS_AtomicSet(&atomicTestCounter, 0x88888888); atomicRet = LOS_AtomicAdd(&atomicTestCounter, 0x33333333); diff --git a/testsuites/sample/kernel/dynlink/It_los_dynlink_001.c b/testsuites/sample/kernel/dynlink/It_los_dynlink_001.c index 282c4f55..466fc55f 100644 --- a/testsuites/sample/kernel/dynlink/It_los_dynlink_001.c +++ b/testsuites/sample/kernel/dynlink/It_los_dynlink_001.c @@ -35,7 +35,7 @@ STATIC UINT32 TestCase(VOID) { INT32 ret; VOID *handle = NULL; - INT32 (*func)(INT32 ,INT32) = NULL; + INT32 (*func)(INT32, INT32) = NULL; handle = (VOID *)LOS_SoLoad(NULL, NULL); ICUNIT_ASSERT_EQUAL(handle, NULL, handle); diff --git a/testsuites/sample/kernel/lmk/It_los_lmk_003.c b/testsuites/sample/kernel/lmk/It_los_lmk_003.c index d4aa5c72..18f94ea2 100644 --- a/testsuites/sample/kernel/lmk/It_los_lmk_003.c +++ b/testsuites/sample/kernel/lmk/It_los_lmk_003.c @@ -96,9 +96,9 @@ STATIC UINT32 TestCase(VOID) ICUNIT_ASSERT_EQUAL(ret, LOS_ERRNO_LMK_RESTORE_NOT_NEEDED, ret); firstOpsNode.freeMem = release_OK; - firstOpsNode.restoreTask =restore_OK; + firstOpsNode.restoreTask = restore_OK; anotherOpsNode.freeMem = release_OK; - anotherOpsNode.restoreTask =restore_OK; + anotherOpsNode.restoreTask = restore_OK; ret = LOS_LmkTasksKill(); ICUNIT_ASSERT_EQUAL(ret, LOS_OK, ret); ret = LOS_LmkTasksRestore(); diff --git a/testsuites/unittest/fuzz/src/socket/net_fuzz.c b/testsuites/unittest/fuzz/src/socket/net_fuzz.c index e2534eff..ad688d7c 100644 --- a/testsuites/unittest/fuzz/src/socket/net_fuzz.c +++ b/testsuites/unittest/fuzz/src/socket/net_fuzz.c @@ -303,7 +303,7 @@ static UINT32 TcpFun(VOID) stTask1.uwResved = LOS_TASK_STATUS_DETACHED; (void)LOS_TaskCreate(&g_testTaskID01, &stTask1); } - }; + } DT_Clear(g_element); CLOSE_Log(); diff --git a/testsuites/unittest/fuzz/src/stdlib/realloc_fuzz.c b/testsuites/unittest/fuzz/src/stdlib/realloc_fuzz.c index eebda93e..5663fa93 100644 --- a/testsuites/unittest/fuzz/src/stdlib/realloc_fuzz.c +++ b/testsuites/unittest/fuzz/src/stdlib/realloc_fuzz.c @@ -57,6 +57,8 @@ void ReallocFuzzTest(void) return; } + (void)memset_s(source, TEST_BUF_LEN, 0, TEST_BUF_LEN); + INIT_FuzzEnvironment(); CreatPrecondForQueue(); for (int i = 0; i < CYCLE_TOTAL_TIMES; i++) { diff --git a/testsuites/unittest/posix/src/string/memory_func_test.c b/testsuites/unittest/posix/src/string/memory_func_test.c index 6b553131..58d54d9c 100644 --- a/testsuites/unittest/posix/src/string/memory_func_test.c +++ b/testsuites/unittest/posix/src/string/memory_func_test.c @@ -268,7 +268,7 @@ LITE_TEST_CASE(PosixMemFuncTestSuite, testOsMemRealloc001, Function | MediumTest mem = malloc(mlen); TEST_ASSERT_NOT_NULL(mem); - memset(mem, testChar, mlen); + (void)memset_s(mem, mlen, testChar, mlen); rlen = rand() % (1024) + mlen; char *mem1 = realloc(mem, rlen); if (mem1 == NULL) { diff --git a/utils/los_compiler.h b/utils/los_compiler.h index 450d7aa9..1c60a306 100644 --- a/utils/los_compiler.h +++ b/utils/los_compiler.h @@ -498,7 +498,7 @@ static inline UINT64 __atomic_load_8(const volatile void *mem, int model) ret = *(UINT64 *)mem; free_lock (memP, model); return ret; -} +} static inline void __atomic_store_8(volatile void *mem, UINT64 val, int model) { @@ -511,7 +511,7 @@ static inline void __atomic_store_8(volatile void *mem, UINT64 val, int model) static inline UINT64 __atomic_exchange_8(volatile void *mem, UINT64 val, int model) { UINT64 ret; - + void *memP = (void *)mem; get_lock (memP, model); ret = *(UINT64 *)mem; diff --git a/utils/los_list.h b/utils/los_list.h index 90fcf4b5..4fce20ef 100644 --- a/utils/los_list.h +++ b/utils/los_list.h @@ -248,7 +248,7 @@ LITE_OS_SEC_ALW_INLINE STATIC_INLINE BOOL LOS_ListEmpty(LOS_DL_LIST *node) *
    • los_list.h: the header file that contains the API declaration.
    * @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