mirror of
https://github.com/open-simh/simtools.git
synced 2026-02-27 01:00:11 +00:00
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:
@@ -265,7 +265,7 @@ BUFFER *mlb_rt11_entry(
|
||||
char *name)
|
||||
{
|
||||
int i;
|
||||
MLBENT *ent;
|
||||
MLBENT *ent = NULL;
|
||||
BUFFER *buf;
|
||||
char *bp;
|
||||
int c;
|
||||
|
||||
Reference in New Issue
Block a user