Mercurial > gnulib
changeset 39266:ce903bc33d51
binary-io: pacify gcc -Wunused-parameter
Problem reported by Reuben Thomas in:
https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html
* lib/binary-io.h (__gl_setmode, __gl_setmode_check):
Use _GL_UNUSED where appropriate.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 05 Mar 2018 15:30:56 -0800 |
parents | 815f874efd4a |
children | ad6d8203c01f |
files | ChangeLog lib/binary-io.h |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Mar 05 10:56:29 2018 -0800 +++ b/ChangeLog Mon Mar 05 15:30:56 2018 -0800 @@ -1,5 +1,11 @@ 2018-03-05 Paul Eggert <eggert@cs.ucla.edu> + binary-io: pacify gcc -Wunused-parameter + Problem reported by Reuben Thomas in: + https://lists.gnu.org/r/bug-gnulib/2018-03/msg00005.html + * lib/binary-io.h (__gl_setmode, __gl_setmode_check): + Use _GL_UNUSED where appropriate. + fflush: adjust to glibc 2.28 libio.h removal Problem reported by Daniel P. Berrangé in: https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html
--- a/lib/binary-io.h Mon Mar 05 10:56:29 2018 -0800 +++ b/lib/binary-io.h Mon Mar 05 15:30:56 2018 -0800 @@ -47,10 +47,8 @@ /* Use a function rather than a macro, to avoid gcc warnings "warning: statement with no effect". */ BINARY_IO_INLINE int -__gl_setmode (int fd, int mode) +__gl_setmode (int fd _GL_UNUSED, int mode _GL_UNUSED) { - (void) fd; - (void) mode; return O_BINARY; } #endif @@ -59,7 +57,7 @@ extern int __gl_setmode_check (int); #else BINARY_IO_INLINE int -__gl_setmode_check (int fd) { return 0; } +__gl_setmode_check (int fd _GL_UNUSED) { return 0; } #endif /* Set FD's mode to MODE, which should be either O_TEXT or O_BINARY.