Commit Graph

5 Commits

Author SHA1 Message Date
Xiang Xiao
3ba18e5407 testing/ostest: Fix the compiler warning
aio.c: In function ‘check_done’:
aio.c:158:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
  158 |           printf("  list[%d]. result = %d\n", i, aiocbp->aio_result);
      |                                        ~^        ~~~~~~~~~~~~~~~~~~
      |                                         |              |
      |                                         int            ssize_t {aka volatile long int}
      |                                        %ld
aio.c: In function ‘remove_done’:
aio.c:222:41: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘ssize_t’ {aka ‘volatile long int’} [-Wformat=]
  222 |           printf("  list[%d]. result = %d\n", i, aiocbp->aio_result);
      |                                        ~^        ~~~~~~~~~~~~~~~~~~
      |                                         |              |
      |                                         int            ssize_t {aka volatile long int}
      |                                        %ld

sporadic2.c: In function ‘sporadic2_test’:
sporadic2.c:313:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
  313 |   printf("Sporadic 1: prio high %d, low %d, repl %" PRIi32 " ns\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdint.h:35,
                 from /home/xiaoxiang/backup/os/nuttx/nuttx/include/sys/types.h:32,
                 from /home/xiaoxiang/backup/os/nuttx/nuttx/include/stdio.h:30,
                 from sporadic2.c:27:
/home/xiaoxiang/backup/os/nuttx/nuttx/include/arch/inttypes.h:51:24: note: format string is defined here
   51 | #  define PRIi32      "i"
sporadic2.c:315:10: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘long int’ [-Wformat=]
  315 |   printf("Sporadic 2: prio high %d, low %d, repl %" PRIi32 " ns\n",
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-31 14:07:25 -03:00
Alin Jerpelea
3378b8ef54 testing: ostest: nxstyle fixes
Fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Alin Jerpelea
590307e957 testing: update licenses to Apache
Gregory Nutt is has submitted the SGA

Mark Schulte has submitted the ICLA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-10 08:49:24 -05:00
Xiang Xiao
857158451b Unify the void cast usage
1.Remove void cast for function because many place ignore the returned value witout cast
2.Replace void cast for variable with UNUSED macro

Change-Id: Ie644129a563244a6397036789c4c3ea83c4e9b09
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-01-02 23:21:01 +08:00
Gregory Nutt
1ea316b46c apps/testing: Move apps/examples/ostest to apps/testing/ostest. 2018-12-12 16:37:38 -06:00