nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Announcing the second release candidate of nmh 1.7.1

2018-01-23 05:04:01
Hi Andy,

This may be a known issue (or not an issue at all):

uip/post.c: In function 'putadr':
uip/post.c:1239: warning: 'shlen' may be used uninitialized in this function

From a cursory look, it could be uninitialized if the savehdr
parameter is NULL

Yes, but shlen is only written once and every read thereafter is guarded
by a test of saveappend, and that is only ever set true once, at the
same time as shlen.

    if (savehdr) {
        shlen = strlen(savehdr);
        saveappend = true;
    }

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'.

Does swapping the strlen and true line above shut it up?

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>