]> Savannah Git Hosting - gnulib.git/commitdiff
binary-io: pacify gcc -Wunused-parameter
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Mar 2018 23:30:56 +0000 (15:30 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 5 Mar 2018 23:31:23 +0000 (15:31 -0800)
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.

ChangeLog
lib/binary-io.h

index beb8356705a6e094722fbd5099cd460f11c71f56..8f372dfb96fd73d3f2a4359f2032c296c1a5171c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index cce1301d56c9d11537ddda17cb62841a217b9ccd..1f21fc051f6e8b75100b72be65480f651126fa58 100644 (file)
@@ -47,10 +47,8 @@ _GL_INLINE_HEADER_BEGIN
   /* 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 @@ __gl_setmode (int fd, int mode)
 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.