Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit declaration of function 'pipe2' #197

Open
bukepo opened this issue Apr 19, 2021 · 2 comments
Open

implicit declaration of function 'pipe2' #197

bukepo opened this issue Apr 19, 2021 · 2 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@bukepo
Copy link
Member

bukepo commented Apr 19, 2021

commit: 88780da9141b6bb4476f476fdd736590328378e0
log:

ot-commissioner/repo/third_party/libevent/repo/evutil.c:2638:6: warning: implicit declaration of function 'pipe2' is invalid in C99 [-Wimplicit-function-declaration]
        if (pipe2(fd, O_NONBLOCK|O_CLOEXEC) == 0)
            ^
1 warning generated.
@wgtdkp
Copy link
Member

wgtdkp commented Apr 19, 2021

notice that this warning comes from the third_party libevent. I tend to let it be.

FYI, we are not using the latest libevent to be compatible with Android.
There are more platform-specific libevent warnings from on my workstation:

☁  ot-commissioner [main] ⚡  cmake --build build
[67/180] Building C object third_party/libevent/repo/CMakeFiles/event_core_static.dir/evutil_rand.c.o
In file included from ../third_party/libevent/repo/./arc4random.c:64,
                 from ../third_party/libevent/repo/evutil_rand.c:134:
/usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
   21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
      |  ^~~~~~~
In file included from ../third_party/libevent/repo/evutil_rand.c:134:
../third_party/libevent/repo/./arc4random.c: In function ‘arc4_seed_sysctl_linux’:
../third_party/libevent/repo/./arc4random.c:191:3: warning: ‘sysctl’ is deprecated [-Wdeprecated-declarations]
  191 |   if (0 != sysctl(mib, 3, &buf[len], &n, NULL, 0))
      |   ^~
In file included from ../third_party/libevent/repo/./arc4random.c:64,
                 from ../third_party/libevent/repo/evutil_rand.c:134:
/usr/include/x86_64-linux-gnu/sys/sysctl.h:70:12: note: declared here
   70 | extern int sysctl (int *__name, int __nlen, void *__oldval,
      |            ^~~~~~
[180/180] Linking CXX executable tests/commissioner-test

@wgtdkp wgtdkp added the wontfix This will not be worked on label Apr 19, 2021
@bukepo
Copy link
Member Author

bukepo commented Apr 19, 2021

Can _GNU_SOURCE suppress this warning?

@openthread openthread deleted a comment from Mellobrainbox Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants