INN commit: trunk/lib (qio.c)

INN Commit rra at isc.org
Wed Jun 3 19:05:15 UTC 2015


    Date: Wednesday, June 3, 2015 @ 12:05:15
  Author: iulius
Revision: 9889

Fix a gcc warning for an unused variable

Modified:
  trunk/lib/qio.c

-------+
 qio.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Modified: qio.c
===================================================================
--- qio.c	2015-06-03 19:04:46 UTC (rev 9888)
+++ qio.c	2015-06-03 19:05:15 UTC (rev 9889)
@@ -20,13 +20,19 @@
 /* A reasonable default buffer size to use. */
 #define QIO_BUFFERSIZE  8192
 
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
+#define NO_STRUCT_STAT_ST_BLKSIZE_UNUSED
+#else
+#define NO_STRUCT_STAT_ST_BLKSIZE_UNUSED UNUSED
+#endif
+
 /*
 **  Given a file descriptor, return a reasonable buffer size to use for that
 **  file.  Uses st_blksize if available and reasonable, QIO_BUFFERSIZE
 **  otherwise.
 */
 static size_t
-buffer_size(int fd UNUSED)
+buffer_size(int fd NO_STRUCT_STAT_ST_BLKSIZE_UNUSED)
 {
     size_t size = QIO_BUFFERSIZE;
 



More information about the inn-committers mailing list