nuttx/atomic.h:fix Fixed the pragma of ATOMIC_VAR_INIT in clang

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 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-09-14 16:42:04 +08:00 committed by Xiang Xiao
parent 4cec713dbf
commit 03f215b374
8 changed files with 8 additions and 8 deletions

View File

@ -154,7 +154,7 @@ static const struct file_operations g_cryptoops =
static struct inode g_cryptoinode =
{
.i_crefs = ATOMIC_VAR_INIT(1),
.i_crefs = 1,
.u.i_ops = &g_cryptofops
};

View File

@ -131,7 +131,7 @@ static struct inode g_inotify_inode =
NULL,
NULL,
NULL,
ATOMIC_VAR_INIT(1),
1,
FSNODEFLAG_TYPE_DRIVER,
{
&g_inotify_fops

View File

@ -75,7 +75,7 @@ static struct inode g_sock_inode =
NULL, /* i_parent */
NULL, /* i_peer */
NULL, /* i_child */
ATOMIC_VAR_INIT(1), /* i_crefs */
1, /* i_crefs */
FSNODEFLAG_TYPE_SOCKET, /* i_flags */
{
&g_sock_fileops /* u */

View File

@ -80,7 +80,7 @@ static struct inode g_dir_inode =
NULL,
NULL,
NULL,
ATOMIC_VAR_INIT(1),
1,
0,
{ &g_dir_fileops },
};

View File

@ -123,7 +123,7 @@ static struct inode g_epoll_inode =
NULL, /* i_parent */
NULL, /* i_peer */
NULL, /* i_child */
ATOMIC_VAR_INIT(1), /* i_crefs */
1, /* i_crefs */
FSNODEFLAG_TYPE_DRIVER, /* i_flags */
{
&g_epoll_ops /* u */

View File

@ -112,7 +112,7 @@ static struct inode g_eventfd_inode =
NULL, /* i_parent */
NULL, /* i_peer */
NULL, /* i_child */
ATOMIC_VAR_INIT(1), /* i_crefs */
1, /* i_crefs */
FSNODEFLAG_TYPE_DRIVER, /* i_flags */
{
&g_eventfd_fops /* u */

View File

@ -89,7 +89,7 @@ static struct inode g_signalfd_inode =
NULL, /* i_parent */
NULL, /* i_peer */
NULL, /* i_child */
ATOMIC_VAR_INIT(1), /* i_crefs */
1, /* i_crefs */
FSNODEFLAG_TYPE_DRIVER, /* i_flags */
{
&g_signalfd_fileops /* u */

View File

@ -123,7 +123,7 @@ static struct inode g_timerfd_inode =
NULL, /* i_parent */
NULL, /* i_peer */
NULL, /* i_child */
ATOMIC_VAR_INIT(1), /* i_crefs */
1, /* i_crefs */
FSNODEFLAG_TYPE_DRIVER, /* i_flags */
{
&g_timerfd_fops /* u */