Skip to content

Commit

Permalink
Remove unused header files across multiple source files
Browse files Browse the repository at this point in the history
Clean up code by removing redundant and unused header file includes that were identified through static analysis.
This improves code readability and reduces unnecessary dependencies.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
  • Loading branch information
no1wudi authored and xiaoxiang781216 committed Jan 10, 2025
1 parent a5a93c0 commit ffd256d
Show file tree
Hide file tree
Showing 44 changed files with 0 additions and 66 deletions.
1 change: 0 additions & 1 deletion canutils/slcan/slcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include <sys/socket.h>
#include <syslog.h>
#include <sys/uio.h>
#include <net/if.h>
#include <termios.h>
#include <nuttx/can.h>

Expand Down
1 change: 0 additions & 1 deletion examples/can/can_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <fcntl.h>
#include <errno.h>
#include <debug.h>
#include <unistd.h>

#include <nuttx/can/can.h>

Expand Down
1 change: 0 additions & 1 deletion examples/module/main/module_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <syslog.h>
#include <errno.h>
#include <debug.h>
Expand Down
3 changes: 0 additions & 3 deletions examples/nimble/nimble_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include <unistd.h>
#include <sys/boardctl.h>
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>

#include "netutils/netinit.h"

Expand All @@ -51,7 +49,6 @@
#include "services/ias/ble_svc_ias.h"
#include "services/lls/ble_svc_lls.h"
#include "services/tps/ble_svc_tps.h"
#include "services/gap/ble_svc_gap.h"
#include "services/bas/ble_svc_bas.h"
#include "services/dis/ble_svc_dis.h"

Expand Down
1 change: 0 additions & 1 deletion examples/nrf24l01_btle/nrf24l01_btle.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <stdio.h>
#include <poll.h>
#include <fcntl.h>
#include <unistd.h>

#include "nrf24l01_btle.h"

Expand Down
2 changes: 0 additions & 2 deletions examples/relays/relays_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <errno.h>
#include <debug.h>

#include <nuttx/arch.h>

#ifdef CONFIG_ARCH_RELAYS

/****************************************************************************
Expand Down
1 change: 0 additions & 1 deletion examples/rpmsgsocket/rpsock_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
Expand Down
2 changes: 0 additions & 2 deletions examples/usbserial/host.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
* Included Files
****************************************************************************/

#include <stdio.h>

#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion examples/usrsocktest/usrsocktest_noblock_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <unistd.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>

#include "defines.h"

Expand Down
1 change: 0 additions & 1 deletion netutils/pppd/pppd.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
#include <time.h>
#include <debug.h>
#include <unistd.h>

Expand Down
1 change: 0 additions & 1 deletion netutils/telnetc/telnetc.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <stdarg.h>

#if defined(HAVE_ZLIB)
Expand Down
1 change: 0 additions & 1 deletion netutils/thttpd/fdwatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <sys/param.h>
#include <debug.h>
#include <poll.h>
#include <debug.h>

#include "config.h"
#include "thttpd_alloc.h"
Expand Down
1 change: 0 additions & 1 deletion system/vi/vi.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <ctype.h>
#include <syslog.h>
Expand Down
1 change: 0 additions & 1 deletion system/zmodem/zm_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include <ctype.h>
#include <fcntl.h>
#include <sched.h>
#include <assert.h>
Expand Down
1 change: 0 additions & 1 deletion testing/drivertest/drivertest_framebuffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/param.h>

#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion testing/drivertest/drivertest_i2c_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
Expand Down
1 change: 0 additions & 1 deletion testing/drivertest/drivertest_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/param.h>

#include <stdio.h>
Expand Down
1 change: 0 additions & 1 deletion testing/drivertest/drivertest_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <debug.h>
#include <inttypes.h>
Expand Down
1 change: 0 additions & 1 deletion testing/ostest/schedlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include <pthread.h>
#include <errno.h>
#include <sched.h>
#include <unistd.h>
#include <stdint.h>

#ifdef CONFIG_SIM_WALLTIME_SLEEP
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_append_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_creat_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/fs/cases/fs_pread_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@
****************************************************************************/
#include <nuttx/config.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdio.h>
#include "fstest.h"

/****************************************************************************
Expand Down
2 changes: 0 additions & 2 deletions testing/testsuites/kernel/fs/cases/fs_pwrite_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@
****************************************************************************/
#include <nuttx/config.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_read_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <fcntl.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
Expand Down
2 changes: 0 additions & 2 deletions testing/testsuites/kernel/fs/cases/fs_readlink_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
****************************************************************************/
#include <nuttx/config.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
Expand All @@ -34,7 +33,6 @@
#include <string.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_sendfile_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_stat_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/fs/cases/fs_stream_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/fs/cases/fs_symlink_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,10 @@
****************************************************************************/
#include <nuttx/config.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <syslog.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/mm/cmocka_mm_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include "MmTest.h"
#include <cmocka.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/mutex/cmocka_mutex_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include "MutexTest.h"
#include <cmocka.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/pthread/cmocka_pthread_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include "PthreadTest.h"
#include <cmocka.h>
Expand Down
3 changes: 0 additions & 3 deletions testing/testsuites/kernel/socket/cmocka_socket_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdint.h>
#include <stdio.h>
#include "SocketTest.h"
#include <cmocka.h>
Expand Down
2 changes: 0 additions & 2 deletions testing/testsuites/kernel/syscall/cases/accept_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <setjmp.h>
#include <cmocka.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
Expand Down
2 changes: 0 additions & 2 deletions testing/testsuites/kernel/syscall/cases/bind_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@
#include <cmocka.h>
#include <grp.h>
#include <pwd.h>
#include <sys/types.h>
#include <syslog.h>
#include <errno.h>
#include <pthread.h>
#include <netinet/in.h>

Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/syscall/cases/dup2_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <syslog.h>
#include <stdio.h>
#include <errno.h>
#include <syslog.h>
#include <fcntl.h>
#include <stdint.h>
#include <stdarg.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/syscall/cases/dup_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <syslog.h>
#include <stdio.h>
#include <errno.h>
#include <syslog.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <stdint.h>
Expand Down
2 changes: 0 additions & 2 deletions testing/testsuites/kernel/syscall/cases/fsync_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <syslog.h>
#include <unistd.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/statvfs.h>
#include <sys/resource.h>
#include <time.h>
Expand All @@ -38,7 +37,6 @@
#include <sys/stat.h>
#include <sys/statfs.h>
#include <sys/types.h>
#include <sys/resource.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdint.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <signal.h>
#include <stdarg.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/syscall/cases/lstat_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include <fcntl.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
Expand Down
1 change: 0 additions & 1 deletion testing/testsuites/kernel/syscall/cases/memcpy_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <errno.h>
#include <cmocka.h>
#include "SyscallTest.h"

Expand Down
Loading

0 comments on commit ffd256d

Please sign in to comment.