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 da4ee43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/nuttx/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ extern "C++"
# endif
# include <stdbool.h>
# include <stdatomic.h>
# ifndef ATOMIC_VAR_INIT
# ifndef ATOMIC_VAR_INIT || (__clang__)
# define ATOMIC_VAR_INIT(value) (value)
# endif
# else
Expand Down

0 comments on commit da4ee43

Please sign in to comment.