Discussion:
2 patches: long-options.c vs -Wimplicit-fallthrough and .m4 nits
Jim Meyering
2016-10-12 04:56:21 UTC
Permalink
FYI: I've just pushed these:

From 0a4afb9850a6ca342ec111be88ea4d8d795633e8 Mon Sep 17 00:00:00 2001
From: Jim Meyering <***@fb.com>
Date: Wed, 5 Oct 2016 10:43:09 -0700
Subject: [PATCH 1/2] long-options: avoid new GCC 7 warning from
-Wimplicit-fallthrough

* lib/long-options.c (parse_long_options): Add a break statement
to avoid this new warning/failure:
$ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
--create-testdir --dir=/t/x --with-tests --test long-options
../../gllib/long-options.c: In function 'parse_long_options':
../../gllib/long-options.c:66:12: error: this statement may \
fall through [-Werror=implicit-fallthrough]
(*usage_func) (EXIT_SUCCESS);
~^~~~~~~~~~~~~~~~~~~~~~~~~~~
---
ChangeLog | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a4cf1e8..fd8fb48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
2016-10-05 Jim Meyering <***@fb.com>

+ long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
+ * lib/long-options.c (parse_long_options): Add a break statement
+ to avoid this new warning/failure:
+ $ CFLAGS='-O -Werror=implicit-fallthrough' ./gnulib-tool \
+ --create-testdir --dir=/t/x --with-tests --test long-options
+ ../../gllib/long-options.c: In function 'parse_long_options':
+ ../../gllib/long-options.c:66:12: error: this statement may \
+ fall through [-Werror=implicit-fallthrough]
+ (*usage_func) (EXIT_SUCCESS);
+ ~^~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+2016-10-05 Jim Meyering <***@fb.com>
+
utimecmp: avoid new GCC 7 warning from -Wbool-operation
Testing this module would fail when using GCC 7 like this:
$ CFLAGS='-O -Werror=bool-operation' ./gnulib-tool --create-testdir \
--
2.7.4


From 7838dc2442ef44aad25bdb2160df70ebc778c8dc Mon Sep 17 00:00:00 2001
From: Jim Meyering <***@fb.com>
Date: Tue, 11 Oct 2016 21:41:57 -0700
Subject: [PATCH 2/2] maint: remove stray space after "." in AC_DEFINE comment.

* m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Remove space-after-".".
* m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
---
ChangeLog | 6 ++++++
m4/st_dm_mode.m4 | 2 +-
m4/utimes.m4 | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fd8fb48..6cf4142 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-10-11 Jim Meyering <***@fb.com>
+
+ maint: remove stray space after "." in AC_DEFINE comment.
+ * m4/st_dm_mode.m4 (AC_STRUCT_ST_DM_MODE): Remove space-after-".".
+ * m4/utimes.m4 (gl_FUNC_UTIMES): Likewise.
+
2016-10-05 Jim Meyering <***@fb.com>

long-options: avoid new GCC 7 warning from -Wimplicit-fallthrough
diff --git a/m4/st_dm_mode.m4 b/m4/st_dm_mode.m4
index 1cfe68e..debd753 100644
--- a/m4/st_dm_mode.m4
+++ b/m4/st_dm_mode.m4
@@ -17,7 +17,7 @@ AC_DEFUN([AC_STRUCT_ST_DM_MODE],

if test $ac_cv_struct_st_dm_mode = yes; then
AC_DEFINE([HAVE_ST_DM_MODE], [1],
- [Define if struct stat has an st_dm_mode member. ])
+ [Define if struct stat has an st_dm_mode member.])
fi
]
)
diff --git a/m4/utimes.m4 b/m4/utimes.m4
index 1876bec..0778185 100644
--- a/m4/utimes.m4
+++ b/m4/utimes.m4
@@ -145,6 +145,6 @@ main ()
[gl_cv_func_working_utimes=no])])

if test $gl_cv_func_working_utimes = yes; then
- AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly. ])
+ AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly.])
fi
])
--
2.7.4
Paul Eggert
2016-10-12 16:45:12 UTC
Permalink
That email (archived at
<http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00023.html>) is
missing the one-line change that was installed into lib/long-options.c.
Maybe a problem in the way that you invoked vc-dwim?

While we're on the topic of vc-dwim, every time I use vc-dwim I get the
bogus "Nmae ... used only once" diagnostics noted in:

http://lists.gnu.org/archive/html/bug-vc-dwim/2015-12/msg00000.html

Is there a quick fix for that? (I'm trying to avoid relearning Perl. :-)
Jim Meyering
2016-10-12 22:06:48 UTC
Permalink
Post by Paul Eggert
That email (archived at
<http://lists.gnu.org/archive/html/bug-gnulib/2016-10/msg00023.html>) is
missing the one-line change that was installed into lib/long-options.c.
Maybe a problem in the way that you invoked vc-dwim?
PEBKAC :-)
Post by Paul Eggert
While we're on the topic of vc-dwim, every time I use vc-dwim I get the
http://lists.gnu.org/archive/html/bug-vc-dwim/2015-12/msg00000.html
Is there a quick fix for that? (I'm trying to avoid relearning Perl. :-)
Sure. Update past this commit:

commit 5769724fa57b3bcdf11aad52a3c25428bd555f46
Author: Jim Meyering <***@fb.com>
Date: Sun Dec 27 21:49:39 2015 -0800

vc-dwim: port to perl5.22.1

* vc-dwim.pl (run_command): Use *SAVE_ERR and *SAVE_OUT
consistently, to avoid new errors from perl5.22.1.

I guess that means I'm overdue for a new release.
Paul Eggert
2016-10-13 00:31:25 UTC
Permalink
Thanks, that fixed it for me.

Loading...