mirror of
https://github.com/coreutils/coreutils.git
synced 2024-12-13 03:44:26 +08:00
(__attribute__, ATTRIBUTE_UNUSED): Define.
(exit_failure_callback, fallback_failure_callback): Mark unused parameters with ATTRIBUTE_UNUSED.
This commit is contained in:
parent
22210b83b4
commit
c522a489df
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user