This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 922f9932a apps: add <assert.h> header file
922f9932a is described below

commit 922f9932a6361cb6b25328e3995a4b6886e47d51
Author: zhangyuan21 <[email protected]>
AuthorDate: Thu Mar 16 10:35:15 2023 +0800

    apps: add <assert.h> header file
    
    Signed-off-by: zhangyuan21 <[email protected]>
---
 system/nxplayer/nxplayer_common.c      |  3 ++-
 testing/ostest/aio.c                   | 11 ++++++-----
 testing/ostest/barrier.c               |  3 ++-
 testing/ostest/cancel.c                |  1 +
 testing/ostest/cond.c                  |  1 +
 testing/ostest/dev_null.c              |  5 ++++-
 testing/ostest/fpu.c                   |  1 +
 testing/ostest/getopt.c                |  1 +
 testing/ostest/mqueue.c                | 11 ++++++-----
 testing/ostest/mutex.c                 |  4 +++-
 testing/ostest/nsem.c                  |  7 ++++---
 testing/ostest/ostest_main.c           | 11 ++++++-----
 testing/ostest/posixtimer.c            | 10 ++++++----
 testing/ostest/prioinherit.c           |  9 +++++----
 testing/ostest/pthread_cleanup.c       |  3 ++-
 testing/ostest/pthread_rwlock.c        |  3 ++-
 testing/ostest/pthread_rwlock_cancel.c |  1 +
 testing/ostest/restart.c               |  7 ++++---
 testing/ostest/rmutex.c                |  4 +++-
 testing/ostest/robust.c                |  5 +++--
 testing/ostest/roundrobin.c            |  1 +
 testing/ostest/sem.c                   |  4 +++-
 testing/ostest/semtimed.c              |  7 ++++---
 testing/ostest/setvbuf.c               |  2 ++
 testing/ostest/sigev_thread.c          |  9 +++++----
 testing/ostest/sighand.c               |  1 +
 testing/ostest/signest.c               |  1 +
 testing/ostest/sigprocmask.c           |  7 ++++---
 testing/ostest/specific.c              |  4 +++-
 testing/ostest/sporadic.c              |  9 +++++----
 testing/ostest/sporadic2.c             | 10 +++++-----
 testing/ostest/suspend.c               | 12 +++++++-----
 testing/ostest/timedmqueue.c           | 11 ++++++-----
 testing/ostest/timedmutex.c            |  3 ++-
 testing/ostest/timedwait.c             |  1 +
 testing/ostest/tls.c                   |  4 ++--
 testing/ostest/vfork.c                 |  3 ++-
 testing/ostest/waitpid.c               |  1 +
 38 files changed, 118 insertions(+), 73 deletions(-)

diff --git a/system/nxplayer/nxplayer_common.c 
b/system/nxplayer/nxplayer_common.c
index 75fe85c28..f93d5aba7 100644
--- a/system/nxplayer/nxplayer_common.c
+++ b/system/nxplayer/nxplayer_common.c
@@ -24,10 +24,11 @@
 
 #include <sys/types.h>
 
+#include <assert.h>
+#include <debug.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <debug.h>
 #include <unistd.h>
 
 #include <nuttx/audio/audio.h>
diff --git a/testing/ostest/aio.c b/testing/ostest/aio.c
index 6a23025d3..775b56aa5 100644
--- a/testing/ostest/aio.c
+++ b/testing/ostest/aio.c
@@ -24,14 +24,15 @@
 
 #include <nuttx/config.h>
 
+#include <aio.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
-#include <unistd.h>
-#include <signal.h>
 #include <string.h>
-#include <fcntl.h>
-#include <aio.h>
-#include <errno.h>
+#include <unistd.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/barrier.c b/testing/ostest/barrier.c
index 0117ca02d..541c1b55e 100644
--- a/testing/ostest/barrier.c
+++ b/testing/ostest/barrier.c
@@ -22,9 +22,10 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
+#include <pthread.h>
 #include <stdio.h>
 #include <unistd.h>
-#include <pthread.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/cancel.c b/testing/ostest/cancel.c
index 0ed79796d..f9751ee05 100644
--- a/testing/ostest/cancel.c
+++ b/testing/ostest/cancel.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <mqueue.h>
diff --git a/testing/ostest/cond.c b/testing/ostest/cond.c
index 782b33e73..a80a77c28 100644
--- a/testing/ostest/cond.c
+++ b/testing/ostest/cond.c
@@ -22,6 +22,7 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
 #include <pthread.h>
 #include <sched.h>
 #include <stdio.h>
diff --git a/testing/ostest/dev_null.c b/testing/ostest/dev_null.c
index e59e9540a..9352d1daa 100644
--- a/testing/ostest/dev_null.c
+++ b/testing/ostest/dev_null.c
@@ -23,9 +23,12 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+
+#include <assert.h>
+#include <fcntl.h>
 #include <stdio.h>
 #include <unistd.h>
-#include <fcntl.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/fpu.c b/testing/ostest/fpu.c
index 43df0fc16..0caf173b8 100644
--- a/testing/ostest/fpu.c
+++ b/testing/ostest/fpu.c
@@ -26,6 +26,7 @@
 #include <nuttx/arch.h>
 #include <sys/wait.h>
 
+#include <assert.h>
 #include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/testing/ostest/getopt.c b/testing/ostest/getopt.c
index c0de79f19..c89667539 100644
--- a/testing/ostest/getopt.c
+++ b/testing/ostest/getopt.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <getopt.h>
 #include <stdio.h>
 #include <string.h>
diff --git a/testing/ostest/mqueue.c b/testing/ostest/mqueue.c
index fadbb0223..ea1617c13 100644
--- a/testing/ostest/mqueue.c
+++ b/testing/ostest/mqueue.c
@@ -24,15 +24,16 @@
 
 #include <nuttx/config.h>
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
+#include <assert.h>
 #include <ctype.h>
+#include <errno.h>
 #include <fcntl.h>
-#include <pthread.h>
 #include <mqueue.h>
+#include <pthread.h>
 #include <sched.h>
-#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/mutex.c b/testing/ostest/mutex.c
index 3503bd879..57ad0b9f3 100644
--- a/testing/ostest/mutex.c
+++ b/testing/ostest/mutex.c
@@ -22,8 +22,10 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
 #include <pthread.h>
+#include <stdio.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/nsem.c b/testing/ostest/nsem.c
index ffb3d4aff..7f8815214 100644
--- a/testing/ostest/nsem.c
+++ b/testing/ostest/nsem.c
@@ -22,12 +22,13 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <pthread.h>
-#include <semaphore.h>
 #include <sched.h>
-#include <errno.h>
+#include <semaphore.h>
+#include <stdio.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 93ccb186f..844396ad0 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -25,15 +25,16 @@
 #include <nuttx/config.h>
 
 #include <sys/wait.h>
+#include <assert.h>
+#include <errno.h>
+#include <malloc.h>
+#include <sched.h>
+#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <malloc.h>
-#include <unistd.h>
-#include <signal.h>
 #include <string.h>
-#include <sched.h>
-#include <errno.h>
+#include <unistd.h>
 
 #ifdef CONFIG_TESTING_OSTEST_POWEROFF
 #include <sys/boardctl.h>
diff --git a/testing/ostest/posixtimer.c b/testing/ostest/posixtimer.c
index bc8346405..1572abeef 100644
--- a/testing/ostest/posixtimer.c
+++ b/testing/ostest/posixtimer.c
@@ -22,12 +22,14 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
-#include <unistd.h>
+#include <assert.h>
+#include <errno.h>
+#include <sched.h>
 #include <semaphore.h>
 #include <signal.h>
-#include <sched.h>
-#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/prioinherit.c b/testing/ostest/prioinherit.c
index ef1ff5112..6a96393de 100644
--- a/testing/ostest/prioinherit.c
+++ b/testing/ostest/prioinherit.c
@@ -22,13 +22,14 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
+#include <errno.h>
+#include <pthread.h>
 #include <sched.h>
-#include <stdio.h>
-#include <unistd.h>
 #include <semaphore.h>
+#include <stdio.h>
 #include <stdlib.h>
-#include <pthread.h>
-#include <errno.h>
+#include <unistd.h>
 
 #ifdef CONFIG_ARCH_SIM
 #  include <nuttx/arch.h>
diff --git a/testing/ostest/pthread_cleanup.c b/testing/ostest/pthread_cleanup.c
index 1f4dabc3a..f10912d9b 100644
--- a/testing/ostest/pthread_cleanup.c
+++ b/testing/ostest/pthread_cleanup.c
@@ -22,9 +22,10 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
+#include <errno.h>
 #include <pthread.h>
 #include <stdio.h>
-#include <errno.h>
 #include <unistd.h>
 
 /****************************************************************************
diff --git a/testing/ostest/pthread_rwlock.c b/testing/ostest/pthread_rwlock.c
index 89de53a31..3b2b492cc 100644
--- a/testing/ostest/pthread_rwlock.c
+++ b/testing/ostest/pthread_rwlock.c
@@ -22,9 +22,10 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
+#include <errno.h>
 #include <pthread.h>
 #include <stdio.h>
-#include <errno.h>
 
 /****************************************************************************
  * Private Types
diff --git a/testing/ostest/pthread_rwlock_cancel.c 
b/testing/ostest/pthread_rwlock_cancel.c
index a449830df..fc4447071 100644
--- a/testing/ostest/pthread_rwlock_cancel.c
+++ b/testing/ostest/pthread_rwlock_cancel.c
@@ -22,6 +22,7 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
 #include <errno.h>
 #include <pthread.h>
 #include <sched.h>
diff --git a/testing/ostest/restart.c b/testing/ostest/restart.c
index 50a1ba54d..76c637464 100644
--- a/testing/ostest/restart.c
+++ b/testing/ostest/restart.c
@@ -24,14 +24,15 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
+#include <errno.h>
+#include <sched.h>
+#include <semaphore.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
-#include <sched.h>
-#include <errno.h>
-#include <semaphore.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/rmutex.c b/testing/ostest/rmutex.c
index a4f406f7e..d1b94466b 100644
--- a/testing/ostest/rmutex.c
+++ b/testing/ostest/rmutex.c
@@ -22,8 +22,10 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
 #include <pthread.h>
+#include <stdio.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/robust.c b/testing/ostest/robust.c
index 14b2cf0da..f2ed48569 100644
--- a/testing/ostest/robust.c
+++ b/testing/ostest/robust.c
@@ -24,10 +24,11 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
+#include <errno.h>
+#include <pthread.h>
 #include <stdio.h>
 #include <time.h>
-#include <pthread.h>
-#include <errno.h>
 #include <unistd.h>
 
 #include "ostest.h"
diff --git a/testing/ostest/roundrobin.c b/testing/ostest/roundrobin.c
index 8b23f4a43..d691b2d2d 100644
--- a/testing/ostest/roundrobin.c
+++ b/testing/ostest/roundrobin.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <pthread.h>
 #include <sched.h>
 #include <semaphore.h>
diff --git a/testing/ostest/sem.c b/testing/ostest/sem.c
index 57e7156c4..cacb2fba3 100644
--- a/testing/ostest/sem.c
+++ b/testing/ostest/sem.c
@@ -22,10 +22,12 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
 #include <pthread.h>
 #include <semaphore.h>
 #include <sched.h>
+#include <stdio.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/semtimed.c b/testing/ostest/semtimed.c
index 9f33ebb4b..58a90b6dc 100644
--- a/testing/ostest/semtimed.c
+++ b/testing/ostest/semtimed.c
@@ -22,12 +22,13 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
+#include <errno.h>
 #include <pthread.h>
+#include <sched.h>
 #include <semaphore.h>
+#include <stdio.h>
 #include <time.h>
-#include <sched.h>
-#include <errno.h>
 #include <unistd.h>
 
 #include "ostest.h"
diff --git a/testing/ostest/setvbuf.c b/testing/ostest/setvbuf.c
index c5449fca6..636332657 100644
--- a/testing/ostest/setvbuf.c
+++ b/testing/ostest/setvbuf.c
@@ -23,6 +23,8 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+
+#include <assert.h>
 #include <stdio.h>
 
 #ifndef CONFIG_STDIO_DISABLE_BUFFERING
diff --git a/testing/ostest/sigev_thread.c b/testing/ostest/sigev_thread.c
index 89e9b593d..1a598fab0 100644
--- a/testing/ostest/sigev_thread.c
+++ b/testing/ostest/sigev_thread.c
@@ -22,12 +22,13 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
-#include <unistd.h>
+#include <assert.h>
+#include <errno.h>
+#include <sched.h>
 #include <semaphore.h>
 #include <signal.h>
-#include <sched.h>
-#include <errno.h>
+#include <stdio.h>
+#include <unistd.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/sighand.c b/testing/ostest/sighand.c
index c30ebc4ac..bbd525cee 100644
--- a/testing/ostest/sighand.c
+++ b/testing/ostest/sighand.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <errno.h>
 #include <pthread.h>
 #include <sched.h>
diff --git a/testing/ostest/signest.c b/testing/ostest/signest.c
index 2eadf53c3..85b32f5a5 100644
--- a/testing/ostest/signest.c
+++ b/testing/ostest/signest.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <errno.h>
 #include <pthread.h>
 #include <sched.h>
diff --git a/testing/ostest/sigprocmask.c b/testing/ostest/sigprocmask.c
index 0c744fd6b..f4c8b8fd1 100644
--- a/testing/ostest/sigprocmask.c
+++ b/testing/ostest/sigprocmask.c
@@ -22,12 +22,13 @@
  * Included Files
  ****************************************************************************/
 
-#include <sys/types.h>
+#include <assert.h>
+#include <errno.h>
+#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
-#include <signal.h>
 #include <string.h>
-#include <errno.h>
+#include <sys/types.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/specific.c b/testing/ostest/specific.c
index 92032ea43..f23db85d8 100644
--- a/testing/ostest/specific.c
+++ b/testing/ostest/specific.c
@@ -22,8 +22,10 @@
  * Included Files
  ****************************************************************************/
 
-#include <stdio.h>
+#include <assert.h>
 #include <pthread.h>
+#include <stdio.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/sporadic.c b/testing/ostest/sporadic.c
index efe4c2d11..8f9fc685b 100644
--- a/testing/ostest/sporadic.c
+++ b/testing/ostest/sporadic.c
@@ -24,13 +24,14 @@
 
 #include <nuttx/config.h>
 
-#include <stdio.h>
-#include <sys/param.h>
-#include <unistd.h>
+#include <assert.h>
 #include <pthread.h>
-#include <semaphore.h>
 #include <sched.h>
+#include <semaphore.h>
+#include <stdio.h>
+#include <sys/param.h>
 #include <time.h>
+#include <unistd.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/sporadic2.c b/testing/ostest/sporadic2.c
index bcfa6da97..ce1811ef0 100644
--- a/testing/ostest/sporadic2.c
+++ b/testing/ostest/sporadic2.c
@@ -24,15 +24,15 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
+#include <pthread.h>
+#include <sched.h>
+#include <semaphore.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/param.h>
-#include <unistd.h>
-
-#include <pthread.h>
-#include <semaphore.h>
-#include <sched.h>
 #include <time.h>
+#include <unistd.h>
 
 #ifdef CONFIG_SCHED_SPORADIC
 
diff --git a/testing/ostest/suspend.c b/testing/ostest/suspend.c
index 0d60feba9..4236250a7 100644
--- a/testing/ostest/suspend.c
+++ b/testing/ostest/suspend.c
@@ -22,14 +22,16 @@
  * Included Files
  ****************************************************************************/
 
-#include <sys/types.h>
+#include <assert.h>
+#include <errno.h>
+#include <sched.h>
+#include <semaphore.h>
+#include <signal.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <sys/types.h>
 #include <unistd.h>
-#include <semaphore.h>
-#include <signal.h>
-#include <sched.h>
-#include <errno.h>
+
 #include "ostest.h"
 
 /****************************************************************************
diff --git a/testing/ostest/timedmqueue.c b/testing/ostest/timedmqueue.c
index 7c9289407..8d6a7b0f4 100644
--- a/testing/ostest/timedmqueue.c
+++ b/testing/ostest/timedmqueue.c
@@ -24,15 +24,16 @@
 
 #include <nuttx/config.h>
 
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
+#include <assert.h>
 #include <ctype.h>
+#include <errno.h>
 #include <fcntl.h>
-#include <pthread.h>
 #include <mqueue.h>
+#include <pthread.h>
 #include <sched.h>
-#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/timedmutex.c b/testing/ostest/timedmutex.c
index c21ef32a2..1bfd7c5b5 100644
--- a/testing/ostest/timedmutex.c
+++ b/testing/ostest/timedmutex.c
@@ -22,10 +22,11 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
 #include <errno.h>
+#include <pthread.h>
 #include <stdbool.h>
 #include <stdio.h>
-#include <pthread.h>
 #include <time.h>
 #include <unistd.h>
 
diff --git a/testing/ostest/timedwait.c b/testing/ostest/timedwait.c
index ccccd50a1..ec4c393d2 100644
--- a/testing/ostest/timedwait.c
+++ b/testing/ostest/timedwait.c
@@ -22,6 +22,7 @@
  * Included Files
  ****************************************************************************/
 
+#include <assert.h>
 #include <errno.h>
 #include <pthread.h>
 #include <sched.h>
diff --git a/testing/ostest/tls.c b/testing/ostest/tls.c
index fd1e3171a..56c5ecddb 100644
--- a/testing/ostest/tls.c
+++ b/testing/ostest/tls.c
@@ -23,14 +23,14 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <nuttx/tls.h>
 
+#include <assert.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
 
-#include <nuttx/tls.h>
-
 #include "ostest.h"
 
 #if CONFIG_TLS_NELEM > 0
diff --git a/testing/ostest/vfork.c b/testing/ostest/vfork.c
index 390669ba8..65082c226 100644
--- a/testing/ostest/vfork.c
+++ b/testing/ostest/vfork.c
@@ -24,11 +24,12 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
+#include <errno.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
-#include <errno.h>
 
 #include "ostest.h"
 
diff --git a/testing/ostest/waitpid.c b/testing/ostest/waitpid.c
index f268fc4ac..3abe62d5c 100644
--- a/testing/ostest/waitpid.c
+++ b/testing/ostest/waitpid.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <assert.h>
 #include <errno.h>
 #include <sched.h>
 #include <signal.h>

Reply via email to