[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] build: accommodate gnulib's new warnings with --enable-gcc-w
From: |
Jim Meyering |
Subject: |
[PATCH 1/2] build: accommodate gnulib's new warnings with --enable-gcc-warnings |
Date: |
Tue, 29 Nov 2011 18:35:30 +0100 |
FYI, more warning-avoidance and a gnulib update:
>From 337e3ad58a7b6be7f146b2c14065b5188e329943 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 29 Nov 2011 18:33:31 +0100
Subject: [PATCH 1/2] 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.
---
configure.ac | 2 ++
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
diff --git a/gzip.h b/gzip.h
index 568ffb0..49a9dbd 100644
--- a/gzip.h
+++ b/gzip.h
@@ -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);
--
1.7.8.rc4
>From d0aa88a5658ae560b3cf3c561d29a1ea1b7aa679 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Tue, 29 Nov 2011 18:18:55 +0100
Subject: [PATCH 2/2] build: update gnulib submodule to latest
---
gnulib | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gnulib b/gnulib
index 667561d..908690c 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 667561d720dd1e22b51fe5d308a8f94d49d46b85
+Subproject commit 908690cb743e69c73b42ae310807b29800c8764b
--
1.7.8.rc4
- [PATCH 1/2] build: accommodate gnulib's new warnings with --enable-gcc-warnings,
Jim Meyering <=
- Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Paul Eggert, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Simon Josefsson, 2011/11/30
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Jim Meyering, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Eric Blake, 2011/11/29
- Re: Removing -Wunsuffixed-float-constants, -Wdouble-promotion, -Wformat-zero-length, Paul Eggert, 2011/11/29