14 Commits

Author SHA1 Message Date
Alin Jerpelea
a91768e715 examples: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-30 18:02:50 +08:00
anjiahao
59855a1a67 remove <nuttx/xxx.h> in stdio need add depend header file
libuv:
CC:  pthread/pthread_mutexattr_setrobust.c libuv/src/unix/thread.c: In function ‘uv_thread_create_ex’:
libuv/src/unix/thread.c:174:24: error: storage size of ‘param’ isn’t known
  174 |     struct sched_param param;
      |                        ^~~~~

btsak_main:
In file included from btsak_main.c:39:
btsak.h:149:1: error: unknown type name ‘bool’
  149 | bool btsak_str2bool(FAR const char *str);

pipe_main.c:
CC:  sim/sim_registerdump.c pipe_main.c:44:30: error: unknown type name ‘pthread_addr_t’
   44 | static void *open_write_only(pthread_addr_t pvarg)
      |                              ^~~~~~~~~~~~~~
pipe_main.c: In function ‘pipe_main’:
pipe_main.c:81:3: error: unknown type name ‘pthread_t’
   81 |   pthread_t writeonly;

redirect_test.c: In function ‘redirection_test’:
redirect_test.c:205:3: error: unknown type name ‘pthread_t’
  205 |   pthread_t readerid;
      |   ^~~~~~~~~
redirect_test.c:206:3: error: unknown type name ‘pthread_t’
  206 |   pthread_t writerid;
      |   ^~~~~~~~~

drivertest_posix_timer.c:48:29: error: ‘optarg’ undeclared (first use in this function)
   48 |       value = (type)strtoul(optarg, &ptr, base);                      \

drivertest_posix_timer.c:208:3: warning: implicit declaration of function ‘sleep’ [-Wimplicit-function-declaration]
  208 |   sleep(SLEEPSECONDS);
      |   ^~~~~

drivertest_uart.c:92:13: warning: implicit declaration of function ‘read’; did you mean ‘fread’? [-Wimplicit-function-declaration]
   92 |       len = read(fd, &tmp_char, 1);
      |             ^~~~
      |             fread

drivertest_uart.c:323:44: error: ‘optopt’ undeclared (first use in this function)
  323 |             printf("Unknown option: %c\n", optopt);

kernel/fs/cases/fs_getfilep_test.c:71:9: warning: implicit declaration of function ‘fs_getfilep’ [-Wimplicit-function-declaration]
   71 |   ret = fs_getfilep(fileno(fp), &filep);
      |         ^~~~~~~~~~~

kernel/mm/cases/mm_test_008.c:148:9: warning: implicit declaration of function ‘task_create’; did you mean ‘timer_create’? [-Wimplicit-function-declaration]
  148 |   pid = task_create("TestNuttx08_routine_1",
      |         ^~~~~~~~~~~
      |         timer_create

/home/ajh/work/nuttxwork/apps/testing/cmocka/cmocka_main.c:171:11: warning: implicit declaration of function ‘setenv’ [-Wimplicit-function-declaration]
  171 |           setenv("CMOCKA_XML_FILE", xml_path, 1);
      |           ^~~~~~

drivertest_pm_runtime.c:123:7: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
  123 |       usleep(210 * 1000);
      |       ^~~~~~

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-11-13 16:49:12 +08:00
Tiago Medicci Serrano
0a9b983e90 apps/examples/pipe: check POSIX-compliant behavior of NuttX's FIFOs
Adjust the test considering the POSIX-compliant behavior of the
NuttX's FIFO (mkfifo), which should block `open` for read-only
and write-only. This test's result is expected to be the same with
any other POSIX-compliant system.

This commit also:

 * Fix redirect test;
 * Use pthread instead `task_create` to be able to run this test
on POSIX-compliant systems;
 * General fixes regarding formatting and error messages;
2023-04-22 01:28:25 +08:00
Xiang Xiao
b659f0fbdf Remove the unnecessary cast for main_t, NULL and argv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Xiang Xiao
893387b2c5 Fix the minor style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Alin Jerpelea
2ac8589a25 examples: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Alin Jerpelea
6bc7a448de examples: author: Gregory Nutt: update licenses to Apache
Gregory Nutt is has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-15 05:16:58 -05:00
Gregory Nutt
4a140f70d0 apps/examples/pipes: Fix some kruft left in last commit; Also clean up some coding standard problems. 2017-11-29 15:27:20 -06:00
Gregory Nutt
1956f66ee6 apps/examples/pipes: Eliminate some warnings. 2017-11-29 15:19:29 -06:00
Gregory Nutt
e9447c6058 Standardize nameing of the pre-processor definitiongs group header 2015-10-02 14:06:11 -06:00
Gregory Nutt
59a89b687d Clean up some naming: fd vs. fildes vs. filedes and filep vs filp 2013-09-28 16:50:07 -06:00
patacongo
9fdb1157ee USB device drivers: Add hooks to to use common, external DMA buffer allocation implementation..
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5142 42af7a65-404d-4744-a932-0658087f49c3
2012-09-13 14:14:18 +00:00
patacongo
02eb94cd00 Add configurable application entry point
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5070 42af7a65-404d-4744-a932-0658087f49c3
2012-08-30 20:13:50 +00:00
patacongo
bafd2949c3 Move nuttx/examples to apps/examples
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3405 42af7a65-404d-4744-a932-0658087f49c3
2011-03-20 18:18:19 +00:00