Re: [hatari-devel] Re: Feature request: allow to specify "-d" with autostart

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 06/13/2017 04:52 PM, Nicolas Pomarède wrote:
Le 07/06/2017 à 22:57, Eero Tamminen a écrit :
Commited the change.

I noticed a small warning while updating sources :

/home/npomarede/src/hatari-int/src/inffile.c: In function
'INF_CreateOverride':
/home/npomarede/src/hatari-int/src/inffile.c:746:5: attention : 'format'
may be used uninitialized in this function [-Wmaybe-uninitialized]
     fprintf(fp, format, prgname);
     ^
/home/npomarede/src/hatari-int/src/inffile.c:677:14: note: 'format' was
declared here
  const char *format, *infname, *prgname;
              ^

'format' will be filled if prgname is not null, which might always be
the case ?

Yes, it's always valid when it's used, and I don't see this warning.
I think your compiler is buggy.


Could change the code to remove this warning if possible ?

Feel free to initialize "format" to NULL if it bothers you.


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/