fix: 规范整改
Signed-off-by: zhushengle <zhushengle@huawei.com> Change-Id: I7be78853291d53636fd199104b4c72bbab222bcd
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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++) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
#include <lwip/sys.h>
|
||||
#include <lwip/debug.h>
|
||||
#include <los_task.h>
|
||||
#include <los_tick.h>
|
||||
#include <los_queue.h>
|
||||
#include <los_sem.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)
|
||||
{
|
||||
(void)mbox;
|
||||
(void)msg;
|
||||
return ERR_ARG;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
1
components/shell/src/base/shcmd.c
Executable file → Normal file
1
components/shell/src/base/shcmd.c
Executable file → Normal 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__);
|
||||
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 */
|
||||
|
||||
0
components/shell/src/base/shcmdparse.c
Executable file → Normal file
0
components/shell/src/base/shcmdparse.c
Executable file → Normal file
0
components/shell/src/base/show.c
Executable file → Normal file
0
components/shell/src/base/show.c
Executable file → Normal file
0
components/shell/src/cmds/date_shell.c
Executable file → Normal file
0
components/shell/src/cmds/date_shell.c
Executable file → Normal file
0
components/shell/src/cmds/fullpath.c
Executable file → Normal file
0
components/shell/src/cmds/fullpath.c
Executable file → Normal file
0
components/shell/src/cmds/mempt_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/mempt_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/shell_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/shell_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/task_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/task_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/vfs_shellcmd.c
Executable file → Normal file
0
components/shell/src/cmds/vfs_shellcmd.c
Executable file → Normal 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
|
||||
|
||||
Reference in New Issue
Block a user