Skip to content

Commit

Permalink
nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang
Browse files Browse the repository at this point in the history
Error: vfs/fs_epoll.c:126:3: error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma]
  ATOMIC_VAR_INIT(1),     /* i_crefs */
  ^
/Applications/Xcode_15.2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/15.0.0/include/stdatomic.h:54:41: note: macro marked 'deprecated' here
                                        ^
1 error generated.
make[1]: *** [fs_epoll.o] Error 1
Error: socket/socket.c:78:3: error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma]
  ATOMIC_VAR_INIT(1),     /* i_crefs */

Signed-off-by: chenrun1 <[email protected]>
  • Loading branch information
crafcat7 committed Sep 14, 2024
1 parent a13499f commit 5205293
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/nuttx/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ extern "C++"
# if !(__clang__) && defined(__cplusplus)
# define _Atomic
# endif
# if (__clang__)
# define _CLANG_DISABLE_CRT_DEPRECATION_WARNINGS
# endif
# include <stdbool.h>
# include <stdatomic.h>
# ifndef ATOMIC_VAR_INIT
Expand Down

0 comments on commit 5205293

Please sign in to comment.