[PATCH 2/2] cpukit: Remove unused includes

Kinsey Moore kinsey.moore at oarcorp.com
Fri Oct 13 03:16:32 UTC 2023


---
 cpukit/libblock/src/bdbuf.c                    | 1 -
 cpukit/libcsupport/src/getpid.c                | 1 -
 cpukit/libcsupport/src/getppid.c               | 2 --
 cpukit/libcsupport/src/isatty_r.c              | 1 -
 cpukit/libcsupport/src/sup_fs_location.c       | 1 -
 cpukit/posix/src/condtimedwait.c               | 1 -
 cpukit/posix/src/killinfo.c                    | 1 -
 cpukit/posix/src/mutexattrsetprotocol.c        | 1 -
 cpukit/posix/src/mutexunlock.c                 | 2 --
 cpukit/posix/src/psignal.c                     | 1 -
 cpukit/posix/src/psignalclearsignals.c         | 1 -
 cpukit/posix/src/psignalsetprocesssignals.c    | 1 -
 cpukit/posix/src/psignalunblockthread.c        | 1 -
 cpukit/posix/src/pthreadgetschedparam.c        | 1 -
 cpukit/posix/src/pthreadsetschedparam.c        | 1 -
 cpukit/sapi/src/sapirbtreeinsert.c             | 1 -
 cpukit/score/src/heap.c                        | 2 --
 cpukit/score/src/objectinitializeinformation.c | 1 -
 cpukit/score/src/threadrestart.c               | 2 --
 cpukit/score/src/userextiterate.c              | 2 --
 20 files changed, 25 deletions(-)

diff --git a/cpukit/libblock/src/bdbuf.c b/cpukit/libblock/src/bdbuf.c
index 06b756272f..ee98ada85f 100644
--- a/cpukit/libblock/src/bdbuf.c
+++ b/cpukit/libblock/src/bdbuf.c
@@ -39,7 +39,6 @@
 #include <pthread.h>
 
 #include <rtems.h>
-#include <rtems/error.h>
 #include <rtems/thread.h>
 #include <rtems/score/assert.h>
 
diff --git a/cpukit/libcsupport/src/getpid.c b/cpukit/libcsupport/src/getpid.c
index 84cab91a39..464504de7e 100644
--- a/cpukit/libcsupport/src/getpid.c
+++ b/cpukit/libcsupport/src/getpid.c
@@ -40,7 +40,6 @@
 #include <unistd.h>
 
 #include <rtems.h>
-#include <rtems/seterr.h>
 
 /**
  *  4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
diff --git a/cpukit/libcsupport/src/getppid.c b/cpukit/libcsupport/src/getppid.c
index 46d1cc8e08..2ca7a8f900 100644
--- a/cpukit/libcsupport/src/getppid.c
+++ b/cpukit/libcsupport/src/getppid.c
@@ -46,8 +46,6 @@
 
 #include <unistd.h>
 
-#include <rtems/seterr.h>
-
 pid_t _POSIX_types_Ppid = 0;
 
 /**
diff --git a/cpukit/libcsupport/src/isatty_r.c b/cpukit/libcsupport/src/isatty_r.c
index 7a758c54a8..3ae285fb26 100644
--- a/cpukit/libcsupport/src/isatty_r.c
+++ b/cpukit/libcsupport/src/isatty_r.c
@@ -44,7 +44,6 @@
  */
 #include <unistd.h>
 #include <reent.h>
-#include <sys/stat.h>
 
 int _isatty_r(
   struct _reent *ptr,
diff --git a/cpukit/libcsupport/src/sup_fs_location.c b/cpukit/libcsupport/src/sup_fs_location.c
index 1f533f37f4..a121b252fb 100644
--- a/cpukit/libcsupport/src/sup_fs_location.c
+++ b/cpukit/libcsupport/src/sup_fs_location.c
@@ -39,7 +39,6 @@
 #include <stdlib.h>
 
 #include <rtems/libio_.h>
-#include <rtems/score/threaddispatch.h>
 
 rtems_interrupt_lock rtems_filesystem_mt_entry_lock_control =
   RTEMS_INTERRUPT_LOCK_INITIALIZER("mount table entry");
diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c
index b063aac9b1..258e38a357 100644
--- a/cpukit/posix/src/condtimedwait.c
+++ b/cpukit/posix/src/condtimedwait.c
@@ -39,7 +39,6 @@
 #endif
 
 #include <rtems/posix/condimpl.h>
-#include <rtems/score/todimpl.h>
 
 /*
  *  11.4.4 Waiting on a Condition, P1003.1c/Draft 10, p. 105
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index 2765ab30ca..f56c5b3174 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -47,7 +47,6 @@
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/score/isr.h>
-#include <rtems/score/schedulerimpl.h>
 #include <rtems/score/statesimpl.h>
 #include <rtems/seterr.h>
 
diff --git a/cpukit/posix/src/mutexattrsetprotocol.c b/cpukit/posix/src/mutexattrsetprotocol.c
index 5a6c44cf52..c3205c9a75 100644
--- a/cpukit/posix/src/mutexattrsetprotocol.c
+++ b/cpukit/posix/src/mutexattrsetprotocol.c
@@ -44,7 +44,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/muteximpl.h>
-#include <rtems/posix/priorityimpl.h>
 
 /*
  *  13.6.1 Mutex Initialization Scheduling Attributes, P1003.1c/Draft 10, p. 128
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index 681aa8fd1b..0644cec188 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -41,8 +41,6 @@
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/posixapi.h>
 
-#include <string.h>
-
 bool _POSIX_Mutex_Auto_initialization( POSIX_Mutex_Control *the_mutex )
 {
   unsigned long zero;
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index a829c60ee1..3bfd779630 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -50,7 +50,6 @@
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/config.h>
-#include <rtems/seterr.h>
 #include <rtems/sysinit.h>
 
 /*
diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
index f31cbf0d27..0c8ae8e1a6 100644
--- a/cpukit/posix/src/psignalclearsignals.c
+++ b/cpukit/posix/src/psignalclearsignals.c
@@ -44,7 +44,6 @@
 
 #include <rtems/score/isr.h>
 #include <rtems/score/thread.h>
-#include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthreadimpl.h>
diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
index 213de57406..9af03943f4 100644
--- a/cpukit/posix/src/psignalsetprocesssignals.c
+++ b/cpukit/posix/src/psignalsetprocesssignals.c
@@ -43,7 +43,6 @@
 
 #include <rtems/score/isr.h>
 #include <rtems/score/thread.h>
-#include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthreadimpl.h>
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index 5b0168c22d..61c2602b96 100644
--- a/cpukit/posix/src/psignalunblockthread.c
+++ b/cpukit/posix/src/psignalunblockthread.c
@@ -46,7 +46,6 @@
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadqimpl.h>
 #include <rtems/score/watchdogimpl.h>
-#include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthreadimpl.h>
diff --git a/cpukit/posix/src/pthreadgetschedparam.c b/cpukit/posix/src/pthreadgetschedparam.c
index 09c2611ce9..88ea525d1b 100644
--- a/cpukit/posix/src/pthreadgetschedparam.c
+++ b/cpukit/posix/src/pthreadgetschedparam.c
@@ -47,7 +47,6 @@
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/posix/pthreadattrimpl.h>
 #include <rtems/posix/priorityimpl.h>
-#include <rtems/score/schedulerimpl.h>
 #include <rtems/score/threadimpl.h>
 
 int pthread_getschedparam(
diff --git a/cpukit/posix/src/pthreadsetschedparam.c b/cpukit/posix/src/pthreadsetschedparam.c
index 18168a5501..06508ef451 100644
--- a/cpukit/posix/src/pthreadsetschedparam.c
+++ b/cpukit/posix/src/pthreadsetschedparam.c
@@ -49,7 +49,6 @@
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/score/threadimpl.h>
-#include <rtems/score/schedulerimpl.h>
 
 static int _POSIX_Set_sched_param(
   Thread_Control             *the_thread,
diff --git a/cpukit/sapi/src/sapirbtreeinsert.c b/cpukit/sapi/src/sapirbtreeinsert.c
index 0d0871891c..41fc47ef33 100644
--- a/cpukit/sapi/src/sapirbtreeinsert.c
+++ b/cpukit/sapi/src/sapirbtreeinsert.c
@@ -39,7 +39,6 @@
 #endif
 
 #include <rtems/rbtree.h>
-#include <rtems/score/rbtreeimpl.h>
 
 RTEMS_STATIC_ASSERT(
   sizeof( rtems_rbtree_compare_result ) >= sizeof( intptr_t ),
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
index 948e48e5d5..f2d02940bd 100644
--- a/cpukit/score/src/heap.c
+++ b/cpukit/score/src/heap.c
@@ -45,8 +45,6 @@
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/interr.h>
 
-#include <string.h>
-
 #if CPU_ALIGNMENT == 0 || CPU_ALIGNMENT % 2 != 0
   #error "invalid CPU_ALIGNMENT value"
 #endif
diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c
index 3482f2871e..7c1bfd877f 100644
--- a/cpukit/score/src/objectinitializeinformation.c
+++ b/cpukit/score/src/objectinitializeinformation.c
@@ -42,7 +42,6 @@
 #include <rtems/score/objectimpl.h>
 #include <rtems/score/address.h>
 #include <rtems/score/chainimpl.h>
-#include <rtems/score/interr.h>
 #include <rtems/score/sysstate.h>
 
 void _Objects_Initialize_information(
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 16b09a96eb..d1c4b283fb 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -46,10 +46,8 @@
 #include <rtems/score/apimutex.h>
 #include <rtems/score/assert.h>
 #include <rtems/score/chainimpl.h>
-#include <rtems/score/freechainimpl.h>
 #include <rtems/score/isrlock.h>
 #include <rtems/score/schedulerimpl.h>
-#include <rtems/score/stackimpl.h>
 #include <rtems/score/sysstate.h>
 #include <rtems/score/threadqimpl.h>
 #include <rtems/score/userextimpl.h>
diff --git a/cpukit/score/src/userextiterate.c b/cpukit/score/src/userextiterate.c
index 25f0f9658b..6f6790082a 100644
--- a/cpukit/score/src/userextiterate.c
+++ b/cpukit/score/src/userextiterate.c
@@ -47,8 +47,6 @@
 
 #include <rtems/score/userextimpl.h>
 
-#include <pthread.h>
-
 User_extensions_List _User_extensions_List = {
   CHAIN_INITIALIZER_EMPTY( _User_extensions_List.Active ),
   CHAIN_ITERATOR_REGISTRY_INITIALIZER( _User_extensions_List.Iterators )
-- 
2.39.2



More information about the devel mailing list