osx: avoid compilation warning with Clang
~~~~ src/unix/stream.c:1089:19: warning: variable length array folded to constant array as an extension [-Wgnu-folding-constant] char cmsg_space[CMSG_SPACE(UV__CMSG_FD_SIZE)]; ~~~~ PR-URL: https://github.com/libuv/libuv/pull/677 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
parent
01ab8d64ad
commit
f1a13e9b4a
@ -1082,6 +1082,11 @@ static int uv__stream_recv_cmsg(uv_stream_t* stream, struct msghdr* msg) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wgnu-folding-constant"
|
||||
#endif
|
||||
|
||||
static void uv__read(uv_stream_t* stream) {
|
||||
uv_buf_t buf;
|
||||
ssize_t nread;
|
||||
@ -1187,6 +1192,10 @@ static void uv__read(uv_stream_t* stream) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#undef UV__CMSG_FD_COUNT
|
||||
#undef UV__CMSG_FD_SIZE
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user