Re: switch missing default case

2019-04-07 Thread Hal Murray via devel
> I'm unaware of any we can't fix, except the bison one. There are several others. >From old CentOS: > ntp_parser.tab.c:389:6: warning: "YYENABLE_NLS" is not defined > ntp_parser.tab.c:1323:6: warning: "YYLTYPE_IS_TRIVIAL" is not defined >From NetBSD on a Raspbery Pi: > /usr/pkg/lib/libpython2.

Re: switch missing default case

2019-04-07 Thread Gary E. Miller via devel
Yo Hal! On Sun, 07 Apr 2019 16:29:48 -0700 Hal Murray via devel wrote: > > New warning on arm64: > > Also happens on Fedora, both 64 and 32 bit. Easy to fix. If no one beats me to it I'll fix Monday. > Is it reasonable to fix the CI system to complain about warnings > except for a (hopeful

Re: switch missing default case

2019-04-07 Thread Hal Murray via devel
> New warning on arm64: Also happens on Fedora, both 64 and 32 bit. Is it reasonable to fix the CI system to complain about warnings except for a (hopefully short) list of known ones that we can't fix? -- These are my opinions. I hate spam. ___

✘switch missing default case

2019-04-07 Thread Gary E. Miller via devel
Yo All! New warning on arm64: [ 99/144] Compiling ntpd/ntp_loopfilter.c In file included from ../../ntpd/refclock_gpsd.c:78: ../../ntpd/../libjsmn/jsmn.c: In function ‘jsmn_parse_primitive’: ../../ntpd/../libjsmn/jsmn.c:43:3: warning: switch missing default case [-Wswitch-default] switch (js[

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Fred Wright via devel
On Sun, 7 Apr 2019, Hal Murray wrote: Does a simple void cast work? E.g.: (void) strerror_r(...) I haven't found the magic using that approach. ../../ntpd/nts.c:214:16: warning: ignoring return value of ???strerror_r???, declared with attribute warn_unused_result [-Wunused-result]

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Hal Murray via devel
> Does a simple void cast work? E.g.: > (void) strerror_r(...) I haven't found the magic using that approach. ../../ntpd/nts.c:214:16: warning: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Wunused-result] (void) strerror_r(errno, errbu

Getting a serial port automatically set up at boot

2019-04-07 Thread Achim Gratz via devel
I have a few refclocks that are connected via a serial port (either USB or a real one) and here's what needs to be set up for udev and systemd setting those up correctly at boot, so you don't have to remember to run the respective commands by hand. The udev part is easy to find, it took me a whi

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Fred Wright via devel
On Sun, 7 Apr 2019, Eric S. Raymond via devel wrote: Hal Murray via devel : ../../ntpd/nts.c:213:9: warning: ignoring return value of ???strerror_r???, declared with attribute warn_unused_result [-Wunused-result] I'm only getting this on Ubuntu, so a secondary question is why isn't that check

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Eric S. Raymond via devel
Hal Murray : > > e...@thyrsus.com said: > > Probablty compiler version. As GCC has evolved it has gotten stricter about > > this sort of thing. > > Fedora 29, no warnings: > gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) > > Ubuntu 18.10, warnings > gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0 > > Ubuntu 18.

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Hal Murray via devel
e...@thyrsus.com said: > Probablty compiler version. As GCC has evolved it has gotten stricter about > this sort of thing. Fedora 29, no warnings: gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2) Ubuntu 18.10, warnings gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0 Ubuntu 18.04.2 LTS, warnings gcc (Ubuntu 7.3.0

I think NTS is thread safe now

2019-04-07 Thread Hal Murray via devel
It gets 23 warnings on Ubuntu: ../../ntpd/nts_client.c:436:5: warning: ignoring return value of ‘strerror_r’, declared with attribute warn_unused_result [-Wunused-result] --- There is a trap in libntp/lib_strbuf.c that should log a message if lib_getbuf() is called from other than th

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Achim Gratz via devel
Hal Murray via devel writes: > I don't know or care which version we get. It's different on different > systems, so to save the result then say UNUSED_LOCAL gets slightly > complicated. --8<---cut here---start->8--- Feature Test Macro Requirements for glibc

Re: What's the best way to fix warnings from unused result

2019-04-07 Thread Eric S. Raymond via devel
Hal Murray via devel : > ../../ntpd/nts.c:213:9: warning: ignoring return value of ‘strerror_r’, > declared with attribute warn_unused_result [-Wunused-result] > > I'm only getting this on Ubuntu, so a secondary question is why isn't that > check happening on other systems? Probablty compil