[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1
From: |
Andy Bradford |
Subject: |
Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1 |
Date: |
23 Jan 2018 19:32:18 -0700 |
Thus said Ralph Corderoy on Tue, 23 Jan 2018 11:03:46 +0000:
> What's the `cc' line from make's output that compile's post.c? And
> what version of a C compiler is it? Can't get the warning here with
> gcc 7.2.1 20171224 and `-std=c99 -pedantic -pedantic-errors -Wall
> -Wextra -Wformat=2 -Wno-format-nonliteral'.
depbase=`echo uip/post.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; cc
-DHAVE_CONFIG_H -I. -g -O2 -Wall -Wextra -MT uip/post.o -MD -MP -MF
$depbase.Tpo -c -o uip/post.o uip/post.c && mv -f $depbase.Tpo $depbase.Po
uip/post.c: In function 'putadr':
uip/post.c:1239: warning: 'shlen' may be used uninitialized in this function
$ cc -v
Reading specs from /usr/lib/gcc-lib/i386-unknown-openbsd6.1/4.2.1/specs
Target: i386-unknown-openbsd6.1
Configured with: OpenBSD/i386 system compiler
Thread model: posix
gcc version 4.2.1 20070719
> Does swapping the strlen and true line above shut it up?
I'm not sure why it would, but I tried:
if (savehdr) {
saveappend = 1;
shlen = strlen(savehdr);
}
And it still issued the same warning.
Also, I tried compiling the same code on OpenBSD 6.2 which apparently
now uses clang, and I didn't get any warning:
depbase=`echo uip/post.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`; cc
-DHAVE_CONFIG_H -I. -g -O2 -Wall -Wextra -MT uip/post.o -MD -MP -MF
$depbase.Tpo -c -o uip/post.o uip/post.c && mv -f $depbase.Tpo $depbase.Po
cc -g -O2 -Wall -Wextra -Qunused-arguments -o uip/post uip/post.o
uip/aliasbr.o mts/libmts.a sbr/libmh.a -lssl -lcrypto 2>&1 | sed -e 's/:
w\(arning: s.*() is .* misused, please use\)/: W\1/'
$ cc -v
OpenBSD clang version 4.0.0 (tags/RELEASE_400/final) (based on LLVM 4.0.0)
Target: i386-unknown-openbsd6.2
Thread model: posix
InstalledDir: /usr/bin
Interesting.
Andy
--
TAI64 timestamp: 400000005a67f057
- [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Ken Hornstein, 2018/01/22
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Andy Bradford, 2018/01/23
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Ralph Corderoy, 2018/01/23
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, David Levine, 2018/01/23
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Ralph Corderoy, 2018/01/23
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Andy Bradford, 2018/01/24
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Ralph Corderoy, 2018/01/24
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, Ralph Corderoy, 2018/01/25
- Message not available
- Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1, David Levine, 2018/01/24