bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] unicodeio.c: mark unused parameters


From: Jim Meyering
Subject: [PATCH] unicodeio.c: mark unused parameters
Date: Sat, 29 Nov 2008 17:44:52 +0100

Hi Bruno,

Sometimes I enable warnings about unused parameters.
When I do, it's distracting to see these go by:

  unicodeio.c: In function 'exit_failure_callback':
  unicodeio.c:172: warning: unused parameter 'callback_arg'
  unicodeio.c: In function 'fallback_failure_callback':
  unicodeio.c:185: warning: unused parameter 'msg'

Ok to avoid the warnings by marking them, as follows?

>From 7d016b9419b433fc3ac7736aaae08815dd189c08 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 29 Nov 2008 17:42:45 +0100
Subject: [PATCH] unicodeio.c: mark unused parameters

* lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
(fallback_failure_callback): Likewise.
---
 ChangeLog       |    4 ++++
 lib/unicodeio.c |    7 +++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 2c90f36..b347c81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-11-29  Jim Meyering  <address@hidden>

+       unicodeio.c: mark unused parameters
+       * lib/unicodeio.c (exit_failure_callback): Mark unused parameter.
+       (fallback_failure_callback): Likewise.
+
        fts: fix a thinko
        * lib/fts.c (s_ifmt_shift_bits): Remove function.  Not needed after all.
        (set_stat_type): Return S_IF*-valued "type" directly.
diff --git a/lib/unicodeio.c b/lib/unicodeio.c
index 5a5d87e..7a15b43 100644
--- a/lib/unicodeio.c
+++ b/lib/unicodeio.c
@@ -169,7 +169,8 @@ fwrite_success_callback (const char *buf, size_t buflen, 
void *callback_arg)

 /* Simple failure callback that displays an error and exits.  */
 static long
-exit_failure_callback (unsigned int code, const char *msg, void *callback_arg)
+exit_failure_callback (unsigned int code, const char *msg,
+                      void *callback_arg _UNUSED_PARAMETER_)
 {
   if (msg == NULL)
     error (1, 0, _("cannot convert U+%04X to local character set"), code);
@@ -182,7 +183,9 @@ exit_failure_callback (unsigned int code, const char *msg, 
void *callback_arg)
 /* Simple failure callback that displays a fallback representation in plain
    ASCII, using the same notation as ISO C99 strings.  */
 static long
-fallback_failure_callback (unsigned int code, const char *msg, void 
*callback_arg)
+fallback_failure_callback (unsigned int code,
+                          const char *msg _UNUSED_PARAMETER_,
+                          void *callback_arg)
 {
   FILE *stream = (FILE *) callback_arg;

--
1.6.0.4.1101.g642f8




reply via email to

[Prev in Thread] Current Thread [Next in Thread]