mirror of git://sourceware.org/git/glibc.git
argp: Move attribute_hidden to argp-fmtstream.h
The internal header redefines the some internal argp functions with attribute_hidden, which triggers clang warning of mismatched attributes. Reviewed-by: Collin Funk <collin.funk1@gmail.com>
This commit is contained in:
parent
110ec4954e
commit
543ddd628f
|
|
@ -47,10 +47,9 @@ tests = \
|
|||
tst-ldbl-argp \
|
||||
# tests
|
||||
|
||||
CFLAGS-argp-help.c += $(uses-callbacks) -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-argp-parse.c += $(uses-callbacks) $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-argp-fmtstream.c += -fexceptions $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-argp-fs-xinl.c += $(config-cflags-wno-ignored-attributes)
|
||||
CFLAGS-argp-help.c += $(uses-callbacks) -fexceptions
|
||||
CFLAGS-argp-parse.c += $(uses-callbacks)
|
||||
CFLAGS-argp-fmtstream.c += -fexceptions
|
||||
|
||||
bug-argp1-ARGS = -- --help
|
||||
bug-argp2-ARGS = -- -d 111 --dstaddr 222 -p 333 --peer 444
|
||||
|
|
|
|||
|
|
@ -107,19 +107,22 @@ __BEGIN_DECLS
|
|||
extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream,
|
||||
size_t __lmargin,
|
||||
size_t __rmargin,
|
||||
ssize_t __wmargin);
|
||||
ssize_t __wmargin)
|
||||
attribute_hidden;
|
||||
extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream,
|
||||
size_t __lmargin,
|
||||
size_t __rmargin,
|
||||
ssize_t __wmargin);
|
||||
|
||||
/* Flush __FS to its stream, and free it (but don't close the stream). */
|
||||
extern void __argp_fmtstream_free (argp_fmtstream_t __fs);
|
||||
extern void __argp_fmtstream_free (argp_fmtstream_t __fs)
|
||||
attribute_hidden;
|
||||
extern void argp_fmtstream_free (argp_fmtstream_t __fs);
|
||||
|
||||
extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
|
||||
const char *__fmt, ...)
|
||||
__attribute__ ((__format__ (printf, 2, 3)));
|
||||
__attribute__ ((__format__ (printf, 2, 3)))
|
||||
attribute_hidden;
|
||||
extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
|
||||
const char *__fmt, ...)
|
||||
__attribute__ ((__format__ (printf, 2, 3)));
|
||||
|
|
@ -131,7 +134,8 @@ extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
|
|||
extern int argp_fmtstream_puts (argp_fmtstream_t __fs, const char *__str);
|
||||
|
||||
extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
const char *__str, size_t __len);
|
||||
const char *__str, size_t __len)
|
||||
attribute_hidden;
|
||||
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
|
||||
const char *__str, size_t __len);
|
||||
|
||||
|
|
@ -167,9 +171,11 @@ extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
|
|||
|
||||
/* Internal routines. */
|
||||
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
|
||||
extern void __argp_fmtstream_update (argp_fmtstream_t __fs);
|
||||
extern void __argp_fmtstream_update (argp_fmtstream_t __fs)
|
||||
attribute_hidden;
|
||||
extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
|
||||
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
|
||||
extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount)
|
||||
attribute_hidden;
|
||||
|
||||
#ifdef __OPTIMIZE__
|
||||
/* Inline versions of above routines. */
|
||||
|
|
|
|||
|
|
@ -1,19 +1 @@
|
|||
#ifndef _ARGP_FMTSTREAM_H
|
||||
#include <argp/argp-fmtstream.h>
|
||||
|
||||
#ifndef _ISOMAC
|
||||
extern __typeof (__argp_fmtstream_ensure) __argp_fmtstream_ensure
|
||||
attribute_hidden;
|
||||
extern __typeof (__argp_fmtstream_free) __argp_fmtstream_free
|
||||
attribute_hidden;
|
||||
extern __typeof (__argp_fmtstream_printf) __argp_fmtstream_printf
|
||||
attribute_hidden;
|
||||
extern __typeof (__argp_fmtstream_update) __argp_fmtstream_update
|
||||
attribute_hidden;
|
||||
extern __typeof (__argp_fmtstream_write) __argp_fmtstream_write
|
||||
attribute_hidden;
|
||||
extern __typeof (__argp_make_fmtstream) __argp_make_fmtstream
|
||||
attribute_hidden;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue