libs/libc/spawn: Add minimal implementation for posix_spawnattr_destory.

Add a minimal implementation to suppress warnings when building
application code shared with other operating systems.

For example:

When building with a c++ compiler and GCC 12.2.0, the following warning is emitted:

nuttx/include/spawn.h:178:40: warning: statement has no effect [-Wunused-value]
  178 | #define posix_spawnattr_destroy(attr) (0)
This commit is contained in:
Stuart Ianna
2023-10-26 13:25:38 +11:00
committed by Xiang Xiao
parent 978e124d42
commit c1db9732c5
4 changed files with 63 additions and 3 deletions
+1 -2
View File
@@ -174,8 +174,7 @@ int posix_spawn_file_actions_addopen(
int posix_spawnattr_init(FAR posix_spawnattr_t *attr);
/* int posix_spawnattr_destroy(FAR posix_spawnattr_t *); */
#define posix_spawnattr_destroy(attr) (0)
int posix_spawnattr_destroy(FAR posix_spawnattr_t *attr);
/* Get spawn attributes interfaces */