Silence a spurious "maybe uninitialized" error.

mlb-rt11.c: In function 'mlb_rt11_entry':
mlb-rt11.c:284:27: warning: 'ent' may be used uninitialized in this function [-Wmaybe-uninitialized]
     buffer_resize(buf, ent->length + 1);        /* Make it large enough */
                        ~~~^~~~~~~~

It is spurious because ent gets initialized in the loop above.
If the loop is never executed, this must be because 0 >= mlb->nentries
and NULL is returned, so the buffer_resize() is never reached.
This commit is contained in:
Olaf Seibert
2021-01-31 16:20:08 +01:00
parent ada2d17a1b
commit 55243369eb

View File

@@ -265,7 +265,7 @@ BUFFER *mlb_rt11_entry(
char *name)
{
int i;
MLBENT *ent;
MLBENT *ent = NULL;
BUFFER *buf;
char *bp;
int c;