diff options
| author | Garrett D'Amore <garrett@damore.org> | 2021-12-25 10:42:32 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2021-12-25 10:42:32 -0800 |
| commit | 788cd607ca4e595d839da67a27453d141d12bae8 (patch) | |
| tree | f90e0a2e7409dff7105f8ba918db9517e93340bd /src/platform | |
| parent | dc91bed46dd12fdc843b9e2c4ed9f3e570914ba3 (diff) | |
| download | nng-788cd607ca4e595d839da67a27453d141d12bae8.tar.gz nng-788cd607ca4e595d839da67a27453d141d12bae8.tar.bz2 nng-788cd607ca4e595d839da67a27453d141d12bae8.zip | |
fixes #1550 GCC diagnostic inside functions not supported in older compilers
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/posix/posix_pipe.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/platform/posix/posix_pipe.c b/src/platform/posix/posix_pipe.c index 8132aff9..ac827ab5 100644 --- a/src/platform/posix/posix_pipe.c +++ b/src/platform/posix/posix_pipe.c @@ -1,5 +1,5 @@ // -// Copyright 2020 Staysail Systems, Inc. <info@staysail.tech> +// Copyright 2021 Staysail Systems, Inc. <info@staysail.tech> // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -98,16 +98,16 @@ nni_plat_pipe_open(int *wfd, int *rfd) return (0); } +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-result" void nni_plat_pipe_raise(int wfd) { char c = 1; -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-result" (void) write(wfd, &c, 1); -#pragma GCC diagnostic pop } +#pragma GCC diagnostic pop void nni_plat_pipe_clear(int rfd) @@ -126,8 +126,8 @@ nni_plat_pipe_clear(int rfd) void nni_plat_pipe_close(int wfd, int rfd) { - close(wfd); - close(rfd); + (void) close(wfd); + (void) close(rfd); } #endif // NNG_USE_EVENTFD |
