Blizzard of warnings on NetBSD 8

Matthew Selsky Matthew.Selsky at twosigma.com
Tue Aug 28 00:57:59 UTC 2018


On Mon, Aug 27, 2018 at 05:20:45PM -0700, Hal Murray via devel wrote:
> 
> What's the story?
> 
> I'm catching up after being off line for several weeks.  I updated a NetBSD 
> box to 8.0 and now it produces lots and lots of warnings that I expect would 
> get fixed before a release.

I brought up a NetBSD 8 VM on GCP a week ago, but it's not yet wired into the CI jobs.

Are you seeing these same warnings on NetBSD 7?

> Most are complaining about %m.  Sample:
>   ../../libntp/msyslog.c:512:5: warning: %m is only allowed in syslog(3) like 
> functions [-Wformat=]

I collected a few links to when NetBSD added these checks for glibc-specific attributes in https://gitlab.com/NTPsec/ntpsec/issues/498  What's the best way to fix? printf("%s", strerror(errno)), as Gary suggested?
 
> There is also:
> ../../ntpd/ntp_control.c:2628:8: warning: format '%u' expects argument of type 
> 'unsigned int', but argument 4 has type 'int' [-Wformat=]

I filed https://gitlab.com/NTPsec/ntpsec/issues/496 a week ago for this. I don't understand where the int is coming from since ntohl() [buried under the mess of macros] returns unsigned int.

> /usr/pkg/lib/libpython2.7.so: warning: warning: tmpnam() possibly used 
> unsafely, use mkstemp() or mkdtemp()
> /usr/pkg/lib/libpython2.7.so: warning: warning: tempnam() possibly used 
> unsafely, use mkstemp() or mkdtemp()

I don't see these functions in our code.  Are these warnings from the python package?


Thanks,
-Matt


More information about the devel mailing list