From 5b87a530f5e0717c8bcf7255e207b88a629d78f7 Mon Sep 17 00:00:00 2001 From: x_xiny <1301913191@qq.com> Date: Sat, 19 Mar 2022 20:22:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:3.1=E4=BB=A3=E7=A0=81=E6=A3=80=E8=A7=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: x_xiny <1301913191@qq.com> Change-Id: I0e0b59cdc22b292ccf0a790010c037d43793a934 --- apps/tftp/src/tftpc.c | 6 +- drivers/block/disk/include/disk.h | 2 - fs/fat/os_adapt/fatfs.c | 2 +- fs/fat/os_adapt/fatfs.h | 2 +- fs/fat/virpart/src/virpartff.c | 12 +- fs/vfs/operation/vfs_force_umount.c | 164 ++++++++++++++---- kernel/base/misc/mempt_shellcmd.c | 2 +- kernel/common/los_config.c | 2 +- kernel/common/los_init_info.h | 2 +- kernel/common/los_printf.c | 4 +- .../extended/dynload/include/los_load_elf.h | 1 - kernel/extended/lms/lms_libc.c | 4 +- kernel/extended/perf/perf_pmu_pri.h | 2 +- kernel/extended/trace/cnv/trace_cnv.c | 2 +- net/lwip-2.1/enhancement/src/api_shell.c | 11 +- net/lwip-2.1/porting/src/driverif.c | 2 - shell/full/src/base/shell_lk.c | 2 +- syscall/los_syscall.c | 2 - syscall/los_syscall.h | 5 +- syscall/misc_syscall.c | 3 - 20 files changed, 156 insertions(+), 76 deletions(-) diff --git a/apps/tftp/src/tftpc.c b/apps/tftp/src/tftpc.c index 725a0fbb..a1ab6f34 100644 --- a/apps/tftp/src/tftpc.c +++ b/apps/tftp/src/tftpc.c @@ -218,7 +218,7 @@ u32_t lwip_tftp_recv_from_server(s32_t iSockNum, u32_t *pulSize, TFTPC_PACKET_S usOpcode = ntohs(pstRecvBuf->usOpcode); /* if this packet is ERROR packet */ if (usOpcode == TFTPC_OP_ERROR) { - ulError = ntohs (pstRecvBuf->u.stTFTP_Err.usErrNum); + ulError = ntohs(pstRecvBuf->u.stTFTP_Err.usErrNum); /*If the error is according to RFC,then convert to lwip error codes. Constant values are used in the cases as these error codes are as per @@ -727,7 +727,7 @@ u32_t lwip_tftp_get_file_by_filename(u32_t ulHostAddr, } /* if this packet is unkonwn or incorrect packet */ - if (ntohs (pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { + if (ntohs(pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { /* Send error packet to server */ lwip_tftp_send_error(iSockNum, TFTPC_PROTOCOL_PROTO_ERROR, @@ -1557,7 +1557,7 @@ u32_t lwip_tftp_get_file_by_filename_to_rawmem(u32_t ulHostAddr, } /* if this packet is unkonwn or incorrect packet */ - if (ntohs (pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { + if (ntohs(pstRecvBuf->usOpcode) != TFTPC_OP_DATA) { /* Send error packet to server */ lwip_tftp_send_error(iSockNum, TFTPC_PROTOCOL_PROTO_ERROR, diff --git a/drivers/block/disk/include/disk.h b/drivers/block/disk/include/disk.h index d006e399..8f79cea3 100644 --- a/drivers/block/disk/include/disk.h +++ b/drivers/block/disk/include/disk.h @@ -45,8 +45,6 @@ #include "bcache.h" #endif -#include "pthread.h" - #ifdef __cplusplus #if __cplusplus extern "C" { diff --git a/fs/fat/os_adapt/fatfs.c b/fs/fat/os_adapt/fatfs.c index 00088127..109ef3f0 100644 --- a/fs/fat/os_adapt/fatfs.c +++ b/fs/fat/os_adapt/fatfs.c @@ -1861,7 +1861,7 @@ static FRESULT fatfs_setlabel(los_part *part) return result; } -int fatfs_mkfs (struct Vnode *device, int sectors, int option) +int fatfs_mkfs(struct Vnode *device, int sectors, int option) { BYTE *work_buff = NULL; los_part *part = NULL; diff --git a/fs/fat/os_adapt/fatfs.h b/fs/fat/os_adapt/fatfs.h index 5fe1a905..76d0f2f4 100644 --- a/fs/fat/os_adapt/fatfs.h +++ b/fs/fat/os_adapt/fatfs.h @@ -137,7 +137,7 @@ int fatfs_readdir(struct Vnode *vnode, struct fs_dirent_s *idir); int fatfs_rewinddir(struct Vnode *vnode, struct fs_dirent_s *dir); int fatfs_closedir(struct Vnode *vnode, struct fs_dirent_s *dir); int fatfs_rename(struct Vnode *oldvnode, struct Vnode *newparent, const char *oldname, const char *newname); -int fatfs_mkfs (struct Vnode *device, int sectors, int option); +int fatfs_mkfs(struct Vnode *device, int sectors, int option); int fatfs_mkdir(struct Vnode *parent, const char *name, mode_t mode, struct Vnode **vpp); int fatfs_rmdir(struct Vnode *parent, struct Vnode *vp, const char *name); int fatfs_unlink(struct Vnode *parent, struct Vnode *vp, const char *name); diff --git a/fs/fat/virpart/src/virpartff.c b/fs/fat/virpart/src/virpartff.c index cbc6b0d8..a990533b 100644 --- a/fs/fat/virpart/src/virpartff.c +++ b/fs/fat/virpart/src/virpartff.c @@ -581,11 +581,11 @@ FRESULT f_checkvirpart(FATFS *fs, const TCHAR *path, BYTE vol) labelTmp = (DWORD *)label; *labelTmp = tmp; tmp = ld_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 4); - *((DWORD * )(label + 4)) = tmp; + *((DWORD *)(label + 4)) = tmp; tmp = ld_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 8); - *((DWORD * )(label + 8)) = tmp; + *((DWORD *)(label + 8)) = tmp; tmp = ld_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 12); - *((DWORD * )(label + 12)) = tmp; + *((DWORD *)(label + 12)) = tmp; if (f_checkname(label) != FR_OK) { (void)f_unregvirfs(fs); @@ -721,11 +721,11 @@ FRESULT f_makevirpart(FATFS *fs, const TCHAR *path, BYTE vol) labelTmp = (DWORD *)label; tmp = *labelTmp; st_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 0, tmp); - tmp = *((DWORD * )(label + 4)); + tmp = *((DWORD *)(label + 4)); st_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 4, tmp); - tmp = *((DWORD * )(label + 8)); + tmp = *((DWORD *)(label + 8)); st_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 8, tmp); - tmp = *((DWORD * )(label + 12)); + tmp = *((DWORD *)(label + 12)); st_dword(work + VR_PARTITION + i * VR_ITEMSIZE + VR_Entry + 12, tmp); virpartper += g_fatVirPart.virtualinfo.virpartpercent[i]; diff --git a/fs/vfs/operation/vfs_force_umount.c b/fs/vfs/operation/vfs_force_umount.c index 5d0d385a..5231829a 100644 --- a/fs/vfs/operation/vfs_force_umount.c +++ b/fs/vfs/operation/vfs_force_umount.c @@ -35,115 +35,174 @@ #include "path_cache.h" /* vnode operations returns EIO */ -static int ErrorVopCreate (struct Vnode *parent, const char *name, int mode, struct Vnode **vnode) +static int ErrorVopCreate(struct Vnode *parent, const char *name, int mode, struct Vnode **vnode) { + (void)parent; + (void)name; + (void)mode; + (void)vnode; return -EIO; } -static int ErrorVopLookup (struct Vnode *parent, const char *name, int len, struct Vnode **vnode) +static int ErrorVopLookup(struct Vnode *parent, const char *name, int len, struct Vnode **vnode) { + (void)parent; + (void)name; + (void)len; + (void)vnode; return -EIO; } -static int ErrorVopOpen (struct Vnode *vnode, int fd, int mode, int flags) +static int ErrorVopOpen(struct Vnode *vnode, int fd, int mode, int flags) { + (void)vnode; + (void)fd; + (void)mode; + (void)flags; return -EIO; } -static int ErrorVopClose (struct Vnode *vnode) +static int ErrorVopClose(struct Vnode *vnode) { + (void)vnode; /* already closed at force umount, do nothing here */ return OK; } -static int ErrorVopReclaim (struct Vnode *vnode) +static int ErrorVopReclaim(struct Vnode *vnode) { + (void)vnode; return -EIO; } -static int ErrorVopUnlink (struct Vnode *parent, struct Vnode *vnode, const char *fileName) +static int ErrorVopUnlink(struct Vnode *parent, struct Vnode *vnode, const char *fileName) { + (void)parent; + (void)vnode; + (void)fileName; return -EIO; } -static int ErrorVopRmdir (struct Vnode *parent, struct Vnode *vnode, const char *dirName) +static int ErrorVopRmdir(struct Vnode *parent, struct Vnode *vnode, const char *dirName) { + (void)parent; + (void)vnode; + (void)dirName; return -EIO; } -static int ErrorVopMkdir (struct Vnode *parent, const char *dirName, mode_t mode, struct Vnode **vnode) +static int ErrorVopMkdir(struct Vnode *parent, const char *dirName, mode_t mode, struct Vnode **vnode) { + (void)parent; + (void)dirName; + (void)mode; + (void)vnode; return -EIO; } -static int ErrorVopReaddir (struct Vnode *vnode, struct fs_dirent_s *dir) +static int ErrorVopReaddir(struct Vnode *vnode, struct fs_dirent_s *dir) { + (void)vnode; + (void)dir; return -EIO; } -static int ErrorVopOpendir (struct Vnode *vnode, struct fs_dirent_s *dir) +static int ErrorVopOpendir(struct Vnode *vnode, struct fs_dirent_s *dir) { + (void)vnode; + (void)dir; return -EIO; } -static int ErrorVopRewinddir (struct Vnode *vnode, struct fs_dirent_s *dir) +static int ErrorVopRewinddir(struct Vnode *vnode, struct fs_dirent_s *dir) { + (void)vnode; + (void)dir; return -EIO; } -static int ErrorVopClosedir (struct Vnode *vnode, struct fs_dirent_s *dir) +static int ErrorVopClosedir(struct Vnode *vnode, struct fs_dirent_s *dir) { + (void)vnode; + (void)dir; /* already closed at force umount, do nothing here */ return OK; } -static int ErrorVopGetattr (struct Vnode *vnode, struct stat *st) +static int ErrorVopGetattr(struct Vnode *vnode, struct stat *st) { + (void)vnode; + (void)st; return -EIO; } -static int ErrorVopSetattr (struct Vnode *vnode, struct stat *st) +static int ErrorVopSetattr(struct Vnode *vnode, struct stat *st) { + (void)vnode; + (void)st; return -EIO; } -static int ErrorVopChattr (struct Vnode *vnode, struct IATTR *attr) +static int ErrorVopChattr(struct Vnode *vnode, struct IATTR *attr) { + (void)vnode; + (void)attr; return -EIO; } -static int ErrorVopRename (struct Vnode *src, struct Vnode *dstParent, const char *srcName, const char *dstName) +static int ErrorVopRename(struct Vnode *src, struct Vnode *dstParent, const char *srcName, const char *dstName) { + (void)src; + (void)dstParent; + (void)srcName; + (void)dstName; return -EIO; } -static int ErrorVopTruncate (struct Vnode *vnode, off_t len) +static int ErrorVopTruncate(struct Vnode *vnode, off_t len) { + (void)vnode; + (void)len; return -EIO; } -static int ErrorVopTruncate64 (struct Vnode *vnode, off64_t len) +static int ErrorVopTruncate64(struct Vnode *vnode, off64_t len) { + (void)vnode; + (void)len; return -EIO; } -static int ErrorVopFscheck (struct Vnode *vnode, struct fs_dirent_s *dir) +static int ErrorVopFscheck(struct Vnode *vnode, struct fs_dirent_s *dir) { + (void)vnode; + (void)dir; return -EIO; } -static int ErrorVopLink (struct Vnode *src, struct Vnode *dstParent, struct Vnode **dst, const char *dstName) +static int ErrorVopLink(struct Vnode *src, struct Vnode *dstParent, struct Vnode **dst, const char *dstName) { + (void)src; + (void)dstParent; + (void)dst; + (void)dstName; return -EIO; } -static int ErrorVopSymlink (struct Vnode *parentVnode, struct Vnode **newVnode, const char *path, const char *target) +static int ErrorVopSymlink(struct Vnode *parentVnode, struct Vnode **newVnode, const char *path, const char *target) { + (void)parentVnode; + (void)newVnode; + (void)path; + (void)target; return -EIO; } -static ssize_t ErrorVopReadlink (struct Vnode *vnode, char *buffer, size_t bufLen) +static ssize_t ErrorVopReadlink(struct Vnode *vnode, char *buffer, size_t bufLen) { + (void)vnode; + (void)buffer; + (void)bufLen; return -EIO; } @@ -173,74 +232,107 @@ static struct VnodeOps g_errorVnodeOps = { }; /* file operations returns EIO */ -static int ErrorFopOpen (struct file *filep) +static int ErrorFopOpen(struct file *filep) { + (void)filep; return -EIO; } -static int ErrorFopClose (struct file *filep) +static int ErrorFopClose(struct file *filep) { + (void)filep; /* already closed at force umount, do nothing here */ return OK; } -static ssize_t ErrorFopRead (struct file *filep, char *buffer, size_t buflen) +static ssize_t ErrorFopRead(struct file *filep, char *buffer, size_t buflen) { + (void)filep; + (void)buffer; + (void)buflen; return -EIO; } -static ssize_t ErrorFopWrite (struct file *filep, const char *buffer, size_t buflen) +static ssize_t ErrorFopWrite(struct file *filep, const char *buffer, size_t buflen) { + (void)filep; + (void)buffer; + (void)buflen; return -EIO; } -static off_t ErrorFopSeek (struct file *filep, off_t offset, int whence) +static off_t ErrorFopSeek(struct file *filep, off_t offset, int whence) { + (void)filep; + (void)offset; + (void)whence; return -EIO; } -static int ErrorFopIoctl (struct file *filep, int cmd, unsigned long arg) +static int ErrorFopIoctl(struct file *filep, int cmd, unsigned long arg) { + (void)filep; + (void)cmd; + (void)arg; return -EIO; } -static int ErrorFopMmap (struct file* filep, struct VmMapRegion *region) +static int ErrorFopMmap(struct file* filep, struct VmMapRegion *region) { + (void)filep; + (void)region; return -EIO; } -static int ErrorFopPoll (struct file *filep, poll_table *fds) +static int ErrorFopPoll(struct file *filep, poll_table *fds) { + (void)filep; + (void)fds; return -EIO; } -static int ErrorFopStat (struct file *filep, struct stat* st) +static int ErrorFopStat(struct file *filep, struct stat* st) { + (void)filep; + (void)st; return -EIO; } -static int ErrorFopFallocate (struct file* filep, int mode, off_t offset, off_t len) +static int ErrorFopFallocate(struct file* filep, int mode, off_t offset, off_t len) { + (void)filep; + (void)mode; + (void)offset; + (void)len; return -EIO; } -static int ErrorFopFallocate64 (struct file *filep, int mode, off64_t offset, off64_t len) +static int ErrorFopFallocate64(struct file *filep, int mode, off64_t offset, off64_t len) { + (void)filep; + (void)mode; + (void)offset; + (void)len; return -EIO; } -static int ErrorFopFsync (struct file *filep) +static int ErrorFopFsync(struct file *filep) { + (void)filep; return -EIO; } -static ssize_t ErrorFopReadpage (struct file *filep, char *buffer, size_t buflen) +static ssize_t ErrorFopReadpage(struct file *filep, char *buffer, size_t buflen) { + (void)filep; + (void)buffer; + (void)buflen; return -EIO; } -static int ErrorFopUnlink (struct Vnode *vnode) +static int ErrorFopUnlink(struct Vnode *vnode) { + (void)vnode; return -EIO; } diff --git a/kernel/base/misc/mempt_shellcmd.c b/kernel/base/misc/mempt_shellcmd.c index 7177ace6..0e8ec47b 100644 --- a/kernel/base/misc/mempt_shellcmd.c +++ b/kernel/base/misc/mempt_shellcmd.c @@ -193,7 +193,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdUname(INT32 argc, const CHAR *argv[]) if (argc == 1) { if (strcmp(argv[0], "-a") == 0) { - PRINTK("%s %d.%d.%d.%d %s %s\n", KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE,\ + PRINTK("%s %d.%d.%d.%d %s %s\n", KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE, \ __DATE__, __TIME__); return 0; } else if (strcmp(argv[0], "-s") == 0) { diff --git a/kernel/common/los_config.c b/kernel/common/los_config.c index b022bab8..c681b669 100644 --- a/kernel/common/los_config.c +++ b/kernel/common/los_config.c @@ -179,7 +179,7 @@ LITE_OS_SEC_TEXT_INIT VOID OsSystemInfo(VOID) #ifdef LOSCFG_KERNEL_SMP LOSCFG_KERNEL_SMP_CORE_NUM, #endif - HalIrqVersion(), __DATE__, __TIME__,\ + HalIrqVersion(), __DATE__, __TIME__, \ KERNEL_NAME, KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE, buildType); } diff --git a/kernel/common/los_init_info.h b/kernel/common/los_init_info.h index 3711a013..dcf493e3 100644 --- a/kernel/common/los_init_info.h +++ b/kernel/common/los_init_info.h @@ -162,7 +162,7 @@ struct ModuleInitInfo { */ #define OS_INIT_LEVEL_REG(_type, _num, _list) \ INIT_LABEL_REG_##_num(EXTERN_LABEL, _type) \ - STATIC struct ModuleInitInfo* _list [] = { \ + STATIC struct ModuleInitInfo *_list[] = { \ INIT_LABEL_REG_##_num(GET_LABEL, _type) \ } diff --git a/kernel/common/los_printf.c b/kernel/common/los_printf.c index 8d55bb9f..25f7c193 100644 --- a/kernel/common/los_printf.c +++ b/kernel/common/los_printf.c @@ -198,7 +198,7 @@ __attribute__((noinline)) VOID UartPrintf(const CHAR *fmt, ...) va_end(ap); } -__attribute__ ((noinline)) VOID dprintf(const CHAR *fmt, ...) +__attribute__((noinline)) VOID dprintf(const CHAR *fmt, ...) { va_list ap; va_start(ap, fmt); @@ -229,7 +229,7 @@ VOID DmesgPrintf(const CHAR *fmt, va_list ap) #endif #ifdef LOSCFG_PLATFORM_UART_WITHOUT_VFS -__attribute__ ((noinline)) INT32 printf(const CHAR *fmt, ...) +__attribute__((noinline)) INT32 printf(const CHAR *fmt, ...) { va_list ap; va_start(ap, fmt); diff --git a/kernel/extended/dynload/include/los_load_elf.h b/kernel/extended/dynload/include/los_load_elf.h index 252d1eab..99d0156d 100644 --- a/kernel/extended/dynload/include/los_load_elf.h +++ b/kernel/extended/dynload/include/los_load_elf.h @@ -45,7 +45,6 @@ #ifdef LOSCFG_DRIVERS_TZDRIVER #include "fs/file.h" #endif -#include "fs/file.h" #include "unistd.h" #ifdef __cplusplus diff --git a/kernel/extended/lms/lms_libc.c b/kernel/extended/lms/lms_libc.c index 1b7fef39..dc2e0e64 100644 --- a/kernel/extended/lms/lms_libc.c +++ b/kernel/extended/lms/lms_libc.c @@ -56,7 +56,7 @@ void *memcpy(void *dest, const void *src, size_t len) } #undef strcat -char *strcat (char *s, const char *append) +char *strcat(char *s, const char *append) { if ((s == NULL) || (append == NULL)) { return NULL; @@ -119,4 +119,4 @@ char *strncpy(char *dest, const char *src, size_t n) __asan_storeN_noabort((UINTPTR)dest, n); __asan_loadN_noabort((UINTPTR)src, size + 1); return __strncpy(dest, src, n); -} \ No newline at end of file +} diff --git a/kernel/extended/perf/perf_pmu_pri.h b/kernel/extended/perf/perf_pmu_pri.h index f1a1edc2..34f2dfa9 100644 --- a/kernel/extended/perf/perf_pmu_pri.h +++ b/kernel/extended/perf/perf_pmu_pri.h @@ -104,7 +104,7 @@ typedef struct { #define PMU_INT(_num) PMU_LABEL_INT_##_num #define OS_PMU_INTS(_num, _list) \ - STATIC UINT32 _list [_num] = { \ + STATIC UINT32 _list[_num] = { \ PMU_INT(_num) \ } diff --git a/kernel/extended/trace/cnv/trace_cnv.c b/kernel/extended/trace/cnv/trace_cnv.c index 3353f4ad..0a20b824 100644 --- a/kernel/extended/trace/cnv/trace_cnv.c +++ b/kernel/extended/trace/cnv/trace_cnv.c @@ -181,7 +181,7 @@ STATIC VOID LOS_TraceTaskResume(const LosTaskCB *taskCB) STATIC VOID LOS_TraceTaskSuspend(const LosTaskCB *taskCB) { - LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus,OsCurrTaskGet()->taskID); + LOS_TRACE(TASK_SUSPEND, taskCB->taskID, taskCB->taskStatus, OsCurrTaskGet()->taskID); } STATIC VOID LOS_TraceIsrEnter(UINT32 hwiNum) diff --git a/net/lwip-2.1/enhancement/src/api_shell.c b/net/lwip-2.1/enhancement/src/api_shell.c index 75b3bbb9..8c0c609f 100644 --- a/net/lwip-2.1/enhancement/src/api_shell.c +++ b/net/lwip-2.1/enhancement/src/api_shell.c @@ -65,7 +65,6 @@ #include "lwip/api_shell.h" #include "lwip/dns.h" -#include "lwip/netdb.h" #include "lwip/udp.h" #include "lwip/priv/tcp_priv.h" @@ -2378,11 +2377,11 @@ LWIP_STATIC int create_ping6_socket(u8_t type, const void *param) } /* Setting socket filter since we are interested only in ECHO REPLY and ERROR messages */ - ICMP6_FILTER_SETBLOCKALL (&icmp6_sock_filter); - ICMP6_FILTER_SETPASS (ICMP6_TYPE_EREP, &icmp6_sock_filter); - ICMP6_FILTER_SETPASS (ICMP6_TYPE_DUR, &icmp6_sock_filter); - ICMP6_FILTER_SETPASS (ICMP6_TYPE_PTB, &icmp6_sock_filter); - ICMP6_FILTER_SETPASS (ICMP6_TYPE_TE, &icmp6_sock_filter); + ICMP6_FILTER_SETBLOCKALL(&icmp6_sock_filter); + ICMP6_FILTER_SETPASS(ICMP6_TYPE_EREP, &icmp6_sock_filter); + ICMP6_FILTER_SETPASS(ICMP6_TYPE_DUR, &icmp6_sock_filter); + ICMP6_FILTER_SETPASS(ICMP6_TYPE_PTB, &icmp6_sock_filter); + ICMP6_FILTER_SETPASS(ICMP6_TYPE_TE, &icmp6_sock_filter); ret = lwip_setsockopt(sfd, IPPROTO_ICMPV6, ICMP6_FILTER, &icmp6_sock_filter, sizeof(struct icmp6_filter)); if (ret == -1) { diff --git a/net/lwip-2.1/porting/src/driverif.c b/net/lwip-2.1/porting/src/driverif.c index 7ddf065b..0852b17e 100644 --- a/net/lwip-2.1/porting/src/driverif.c +++ b/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/shell/full/src/base/shell_lk.c b/shell/full/src/base/shell_lk.c index 5cf41387..3320f1d9 100644 --- a/shell/full/src/base/shell_lk.c +++ b/shell/full/src/base/shell_lk.c @@ -106,7 +106,7 @@ VOID OsLkLogFileSet(const CHAR *str) } fp = fopen(str, "w+"); if (fp == NULL) { - printf("Error can't open the %s file\n",str); + printf("Error can't open the %s file\n", str); return; } diff --git a/syscall/los_syscall.c b/syscall/los_syscall.c index fce1ac16..e589108b 100644 --- a/syscall/los_syscall.c +++ b/syscall/los_syscall.c @@ -57,8 +57,6 @@ #include "sys/prctl.h" #include "sys/socket.h" #include "sys/utsname.h" -#include "poll.h" -#include "sys/uio.h" #ifdef LOSCFG_SHELL #include "shmsg.h" #endif diff --git a/syscall/los_syscall.h b/syscall/los_syscall.h index 0e2405a4..f56ec825 100644 --- a/syscall/los_syscall.h +++ b/syscall/los_syscall.h @@ -63,7 +63,6 @@ #include "epoll.h" #endif #include -#include "sys/resource.h" #ifdef LOSCFG_FS_VFS #include "vnode.h" #endif @@ -148,8 +147,8 @@ extern int SysBind(int s, const struct sockaddr *name, socklen_t namelen); extern int SysConnect(int s, const struct sockaddr *name, socklen_t namelen); extern int SysListen(int sockfd, int backlog); extern int SysAccept(int socket, struct sockaddr *address, socklen_t *addressLen); -extern int SysGetSockName (int s, struct sockaddr *name, socklen_t *namelen); -extern int SysGetPeerName (int s, struct sockaddr *name, socklen_t *namelen); +extern int SysGetSockName(int s, struct sockaddr *name, socklen_t *namelen); +extern int SysGetPeerName(int s, struct sockaddr *name, socklen_t *namelen); extern ssize_t SysSend(int s, const void *dataptr, size_t size, int flags); extern ssize_t SysSendTo(int s, const void *dataptr, size_t size, int flags, const struct sockaddr *to, socklen_t tolen); diff --git a/syscall/misc_syscall.c b/syscall/misc_syscall.c index d92649ff..d1627a94 100644 --- a/syscall/misc_syscall.c +++ b/syscall/misc_syscall.c @@ -44,9 +44,6 @@ #include "shmsg.h" #endif #include "user_copy.h" -#include "los_strncpy_from_user.h" -#include "capability_type.h" -#include "capability_api.h" #include "unistd.h"