diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:33:31 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-29 18:33:36 +0100 |
commit | 337e3ad58a7b6be7f146b2c14065b5188e329943 (patch) | |
tree | 294b849e34fc272dbec12c6a5a6020da4ccf8810 | |
parent | d3cd190bdbd88c83fd1487c43d268a5fb1df76a2 (diff) | |
download | gzip-337e3ad58a7b6be7f146b2c14065b5188e329943.tar.gz |
build: accommodate gnulib's new warnings with --enable-gcc-warnings
* configure.ac (WERROR_CFLAGS): Disable two new warnings:
-Wno-format-nonliteral, -Wno-unsuffixed-float-constants.
* gzip.h (bi_reverse): Declare with _GL_ATTRIBUTE_CONST.
(gzip_base_name): Declare with _GL_ATTRIBUTE_PURE.
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | gzip.h | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 4013dfc..6e3e19b 100644 --- a/configure.ac +++ b/configure.ac @@ -103,6 +103,8 @@ if test "$gl_gcc_warnings" = yes; then gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now gl_WARN_ADD([-Wno-overflow]) # util.c gl_WARN_ADD([-Wno-type-limits]) # util.c + gl_WARN_ADD([-Wno-format-nonliteral]) + gl_WARN_ADD([-Wno-unsuffixed-float-constants]) # In spite of excluding -Wlogical-op above, it is enabled, as of # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c @@ -292,7 +292,7 @@ extern off_t flush_block (char *buf, ulg stored_len, int eof); /* in bits.c */ extern void bi_init (file_t zipfile); extern void send_bits (int value, int length); -extern unsigned bi_reverse (unsigned value, int length); +extern unsigned bi_reverse (unsigned value, int length) _GL_ATTRIBUTE_CONST; extern void bi_windup (void); extern void copy_block (char *buf, unsigned len, int header); extern int (*read_buf) (char *buf, unsigned size); @@ -307,7 +307,7 @@ extern void flush_window (void); extern void write_buf (int fd, voidp buf, unsigned cnt); extern int read_buffer (int fd, voidp buf, unsigned int cnt); extern char *strlwr (char *s); -extern char *gzip_base_name (char *fname); +extern char *gzip_base_name (char *fname) _GL_ATTRIBUTE_PURE; extern int xunlink (char *fname); extern void make_simple_name (char *name); extern char *add_envopt (int *argcp, char ***argvp, char const *env); |