(__attribute__, ATTRIBUTE_UNUSED): Define.

(exit_failure_callback, fallback_failure_callback): Mark unused
parameters with ATTRIBUTE_UNUSED.
This commit is contained in:
Jim Meyering 2005-04-09 14:08:57 +00:00
parent 22210b83b4
commit c522a489df

View File

@ -1,6 +1,6 @@
/* Unicode character output to streams with locale dependent encoding.
Copyright (C) 2000-2003 Free Software Foundation, Inc.
Copyright (C) 2000-2003, 2005 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -46,6 +46,16 @@ extern int errno;
#define _(msgid) gettext (msgid)
#define N_(msgid) msgid
#ifndef __attribute__
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
# define __attribute__(x) /* empty */
# endif
#endif
#ifndef ATTRIBUTE_UNUSED
# define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
#endif
#include "localcharset.h"
/* When we pass a Unicode character to iconv(), we must pass it in a
@ -213,7 +223,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 ATTRIBUTE_UNUSED)
{
if (msg == NULL)
error (1, 0, _("cannot convert U+%04X to local character set"), code);
@ -226,7 +237,8 @@ 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 ATTRIBUTE_UNUSED
, void *callback_arg)
{
FILE *stream = (FILE *) callback_arg;