Silence a spurious "maybe uninitialized" error.

mlb-rsx.c: In function 'mlb_rsx_entry':
mlb-rsx.c:374:23: warning: 'ent' may be used uninitialized in this function [-Wmaybe-uninitialized]
     fseek(mlb->fp, ent->position, SEEK_SET);
                    ~~~^~~~~~~~~~

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 fseek() is never reached.
This commit is contained in:
Olaf Seibert
2021-01-31 16:16:05 +01:00
parent 1d799534bb
commit ada2d17a1b

View File

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