* [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings"
2019-01-01 0:00 ` Mark Wielaard
@ 2019-01-01 0:00 ` Tom de Vries
2019-01-01 0:00 ` Jakub Jelinek
0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Mark Wielaard, dwz
[-- Attachment #1: Type: text/plain, Size: 345 bytes --]
[ was: Re: Added a buildbot for dwz ]
On 16-03-19 18:52, Mark Wielaard wrote:
> On all buildbot workers make check is warning free.
>
> On some there are some warnings about hashtab.c (implicit-fallthrough).
> If that file comes from libiberty maybe we can simply remerge it?
I was about to propose this patch.
OK for trunk?
Thanks,
- Tom
[-- Attachment #2: 0001-Backport-libiberty-Fix-Wimplicit-fallthrough-warnings.patch --]
[-- Type: text/x-patch, Size: 1761 bytes --]
Backport "libiberty: Fix -Wimplicit-fallthrough warnings"
Backport gcc repo commit r241864 to fix implicit fallthrough warnings in
hashtab.c.
2019-03-16 Tom de Vries <tdevries@suse.de>
Port from gcc repo trunk:
2016-11-02 Mark Wielaard <mjw@redhat.com>
* hashtab.c (iterative_hash): Add fall through comments.
---
hashtab.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hashtab.c b/hashtab.c
index b775d25..a1da33e 100644
--- a/hashtab.c
+++ b/hashtab.c
@@ -749,17 +749,17 @@ iterative_hash (const void *k_in /* the key */,
c += length;
switch(len) /* all the case statements fall through */
{
- case 11: c+=((hashval_t)k[10]<<24);
- case 10: c+=((hashval_t)k[9]<<16);
- case 9 : c+=((hashval_t)k[8]<<8);
+ case 11: c+=((hashval_t)k[10]<<24); /* fall through */
+ case 10: c+=((hashval_t)k[9]<<16); /* fall through */
+ case 9 : c+=((hashval_t)k[8]<<8); /* fall through */
/* the first byte of c is reserved for the length */
- case 8 : b+=((hashval_t)k[7]<<24);
- case 7 : b+=((hashval_t)k[6]<<16);
- case 6 : b+=((hashval_t)k[5]<<8);
- case 5 : b+=k[4];
- case 4 : a+=((hashval_t)k[3]<<24);
- case 3 : a+=((hashval_t)k[2]<<16);
- case 2 : a+=((hashval_t)k[1]<<8);
+ case 8 : b+=((hashval_t)k[7]<<24); /* fall through */
+ case 7 : b+=((hashval_t)k[6]<<16); /* fall through */
+ case 6 : b+=((hashval_t)k[5]<<8); /* fall through */
+ case 5 : b+=k[4]; /* fall through */
+ case 4 : a+=((hashval_t)k[3]<<24); /* fall through */
+ case 3 : a+=((hashval_t)k[2]<<16); /* fall through */
+ case 2 : a+=((hashval_t)k[1]<<8); /* fall through */
case 1 : a+=k[0];
/* case 0: nothing left to add */
}
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Added a buildbot for dwz
2019-01-01 0:00 ` Tom de Vries
@ 2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings" Tom de Vries
0 siblings, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2019-01-01 0:00 UTC (permalink / raw)
To: Tom de Vries; +Cc: dwz
[-- Attachment #1: Type: text/plain, Size: 1170 bytes --]
On Sat, Mar 16, 2019 at 05:37:34PM +0100, Tom de Vries wrote:
> On 16-03-19 17:31, Mark Wielaard wrote:
> > The following seems to always suppress the WARNING:
> >
> > diff --git a/Makefile b/Makefile
> > index 1aa208f..2a9898c 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -26,9 +26,14 @@ hello:
> > dw2-restrict:
> > $(CC) $(TEST_SRC)/dw2-restrict.S -o $@ || touch $@
> >
> > +# On some systems we need to set and export DEJAGNU to suppress
> > +# WARNING: Couldn't find the global config file.
> > +DEJAGNU ?= /dev/null
> > +
> > check: dwz $(TEST_EXECS)
> > mkdir -p testsuite-bin
> > cd testsuite-bin; ln -sf $(PWD)/dwz .
> > + export DEJAGNU=$(DEJAGNU); \
> > export PATH=$(PWD)/testsuite-bin:$$PATH; export LC_ALL=C; \
> > runtest --tool=dwz -srcdir testsuite $(RUNTESTFLAGS)
> > rm -Rf testsuite-bin $(TEST_EXECS)
> >
> > Does that make sense?
>
> Works for me.
Great. Pushed as attached.
On all buildbot workers make check is warning free.
On some there are some warnings about hashtab.c (implicit-fallthrough).
If that file comes from libiberty maybe we can simply remerge it?
Cheers,
Mark
[-- Attachment #2: 0001-export-DEJAGNU-for-make-check-to-suppress-global-con.patch --]
[-- Type: text/x-diff, Size: 1138 bytes --]
From f31e9dee0a45d392fe08d3441dd64200a5505a05 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 16 Mar 2019 18:38:49 +0100
Subject: [PATCH] export DEJAGNU for make check to suppress global config file
WARNING.
On some systems we need to set and export DEJAGNU to suppress
WARNING: Couldn't find the global config file.
2019-03-16 Mark Wielaard <mark@klomp.org>
* Makefile (DEJAGNU): Optionally set variable.
(check): export DEJAGNU.
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Makefile b/Makefile
index 1aa208f..2ce7b59 100644
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,14 @@ hello:
dw2-restrict:
$(CC) $(TEST_SRC)/dw2-restrict.S -o $@ || touch $@
+# On some systems we need to set and export DEJAGNU to suppress
+# WARNING: Couldn't find the global config file.
+DEJAGNU ?= /dev/null
+
check: dwz $(TEST_EXECS)
mkdir -p testsuite-bin
cd testsuite-bin; ln -sf $(PWD)/dwz .
+ export DEJAGNU=$(DEJAGNU); \
export PATH=$(PWD)/testsuite-bin:$$PATH; export LC_ALL=C; \
runtest --tool=dwz -srcdir testsuite $(RUNTESTFLAGS)
rm -Rf testsuite-bin $(TEST_EXECS)
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Added a buildbot for dwz
2019-01-01 0:00 ` Mark Wielaard
@ 2019-01-01 0:00 ` Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: Mark Wielaard; +Cc: dwz
On 16-03-19 17:31, Mark Wielaard wrote:
> On Sat, Mar 16, 2019 at 04:23:25PM +0100, Tom de Vries wrote:
>>> To celebrate that dwz now has a testsuite I added a buildbot:
>>> https://builder.wildebeest.org/buildbot/#/builders?tags=dwz
>>>
>>
>> I've just pushed a fix for a dejagnu warning on my laptop, and there I
>> see no warnings anymore.
>>
>> However, all builds on the build bot that I checked show:
>> ...
>> WARNING: Couldn't find the global config file.
>> ...
>>
>> I'm not sure if this should be fixed on the buildbot, or in the sources.
>
> Apparently this comes from not setting the DEJAGNU variable:
>
> There is an optional global site.exp, containing
> configuration values that apply to DejaGnu
> site-wide. runtest loads these values first. The global
> site.exp contains the default values for all targets and
> hosts supported by DejaGnu. This global file is identified
> by setting the environment variable DEJAGNU to the name of
> the file. If DEJAGNU is set, but the file cannot be
> located, an error will be raised and runtest will abort.
>
> https://www.gnu.org/software/dejagnu/manual/Customizing-DejaGnu.html
>
> The following seems to always suppress the WARNING:
>
> diff --git a/Makefile b/Makefile
> index 1aa208f..2a9898c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -26,9 +26,14 @@ hello:
> dw2-restrict:
> $(CC) $(TEST_SRC)/dw2-restrict.S -o $@ || touch $@
>
> +# On some systems we need to set and export DEJAGNU to suppress
> +# WARNING: Couldn't find the global config file.
> +DEJAGNU ?= /dev/null
> +
> check: dwz $(TEST_EXECS)
> mkdir -p testsuite-bin
> cd testsuite-bin; ln -sf $(PWD)/dwz .
> + export DEJAGNU=$(DEJAGNU); \
> export PATH=$(PWD)/testsuite-bin:$$PATH; export LC_ALL=C; \
> runtest --tool=dwz -srcdir testsuite $(RUNTESTFLAGS)
> rm -Rf testsuite-bin $(TEST_EXECS)
>
> Does that make sense?
Works for me.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Added a buildbot for dwz
@ 2019-01-01 0:00 Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
0 siblings, 1 reply; 6+ messages in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: Mark Wielaard, dwz
> Hi,
>
> To celebrate that dwz now has a testsuite I added a buildbot:
> https://builder.wildebeest.org/buildbot/#/builders?tags=dwz
>
> It monitors the dwz.git master branch and does a make && make check
> on every new commit it sees for aarch64, armhf, ppc64, ppc64le, s390x,
> x86_64 and i386.
>
> The ppc64 and ppc64le builders currently fail because they
> don't have dejagnu installed yet. As soon as that is installed
> I expect those to also become green.
>
> It should sent email to this list when a new failure is detected.
>
I've just pushed a fix for a dejagnu warning on my laptop, and there I
see no warnings anymore.
However, all builds on the build bot that I checked show:
...
WARNING: Couldn't find the global config file.
...
I'm not sure if this should be fixed on the buildbot, or in the sources.
Thanks,
- Tom
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Added a buildbot for dwz
2019-01-01 0:00 Added a buildbot for dwz Tom de Vries
@ 2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Tom de Vries
0 siblings, 1 reply; 6+ messages in thread
From: Mark Wielaard @ 2019-01-01 0:00 UTC (permalink / raw)
To: Tom de Vries; +Cc: dwz
On Sat, Mar 16, 2019 at 04:23:25PM +0100, Tom de Vries wrote:
> > To celebrate that dwz now has a testsuite I added a buildbot:
> > https://builder.wildebeest.org/buildbot/#/builders?tags=dwz
> >
>
> I've just pushed a fix for a dejagnu warning on my laptop, and there I
> see no warnings anymore.
>
> However, all builds on the build bot that I checked show:
> ...
> WARNING: Couldn't find the global config file.
> ...
>
> I'm not sure if this should be fixed on the buildbot, or in the sources.
Apparently this comes from not setting the DEJAGNU variable:
There is an optional global site.exp, containing
configuration values that apply to DejaGnu
site-wide. runtest loads these values first. The global
site.exp contains the default values for all targets and
hosts supported by DejaGnu. This global file is identified
by setting the environment variable DEJAGNU to the name of
the file. If DEJAGNU is set, but the file cannot be
located, an error will be raised and runtest will abort.
https://www.gnu.org/software/dejagnu/manual/Customizing-DejaGnu.html
The following seems to always suppress the WARNING:
diff --git a/Makefile b/Makefile
index 1aa208f..2a9898c 100644
--- a/Makefile
+++ b/Makefile
@@ -26,9 +26,14 @@ hello:
dw2-restrict:
$(CC) $(TEST_SRC)/dw2-restrict.S -o $@ || touch $@
+# On some systems we need to set and export DEJAGNU to suppress
+# WARNING: Couldn't find the global config file.
+DEJAGNU ?= /dev/null
+
check: dwz $(TEST_EXECS)
mkdir -p testsuite-bin
cd testsuite-bin; ln -sf $(PWD)/dwz .
+ export DEJAGNU=$(DEJAGNU); \
export PATH=$(PWD)/testsuite-bin:$$PATH; export LC_ALL=C; \
runtest --tool=dwz -srcdir testsuite $(RUNTESTFLAGS)
rm -Rf testsuite-bin $(TEST_EXECS)
Does that make sense?
Thanks,
Mark
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings"
2019-01-01 0:00 ` [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings" Tom de Vries
@ 2019-01-01 0:00 ` Jakub Jelinek
0 siblings, 0 replies; 6+ messages in thread
From: Jakub Jelinek @ 2019-01-01 0:00 UTC (permalink / raw)
To: Tom de Vries; +Cc: Mark Wielaard, dwz
On Sat, Mar 16, 2019 at 07:00:50PM +0100, Tom de Vries wrote:
> [ was: Re: Added a buildbot for dwz ]
> On 16-03-19 18:52, Mark Wielaard wrote:
> > On all buildbot workers make check is warning free.
> >
> > On some there are some warnings about hashtab.c (implicit-fallthrough).
> > If that file comes from libiberty maybe we can simply remerge it?
>
> I was about to propose this patch.
>
> OK for trunk?
>
> Thanks,
> - Tom
>
>
> Backport "libiberty: Fix -Wimplicit-fallthrough warnings"
>
> Backport gcc repo commit r241864 to fix implicit fallthrough warnings in
> hashtab.c.
>
> 2019-03-16 Tom de Vries <tdevries@suse.de>
>
> Port from gcc repo trunk:
> 2016-11-02 Mark Wielaard <mjw@redhat.com>
>
> * hashtab.c (iterative_hash): Add fall through comments.
Ok, thanks.
Jakub
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-03-16 18:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 Added a buildbot for dwz Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` Tom de Vries
2019-01-01 0:00 ` Mark Wielaard
2019-01-01 0:00 ` [PATCH] Backport "libiberty: Fix -Wimplicit-fallthrough warnings" Tom de Vries
2019-01-01 0:00 ` Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).