mouse07410 / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
93 stars 70 forks source link

safe_fwrite: warning: 'ret' may be used uninitialized #184

Closed pespin closed 4 months ago

pespin commented 5 months ago

Using current branch mouse07410/vlm_master (12b8e555b971c745ea715cb247f39120fa15f7f0), with gcc version 13.2.1 20230801:

Making all in libasn1print
make[2]: Entering directory '/home/pespin/dev/sysmocom/build/new/tmpdir/asn1c/libasn1print'
  CC       asn1print.lo
/home/pespin/dev/sysmocom/git/asn1c/libasn1print/asn1print.c: In function 'safe_fwrite':
/home/pespin/dev/sysmocom/git/asn1c/libasn1print/asn1print.c:77:12: warning: 'ret' may be used uninitialized [-Wmaybe-uninitialized]
   77 |     return ret;
      |            ^~~
/home/pespin/dev/sysmocom/git/asn1c/libasn1print/asn1print.c:64:12: note: 'ret' was declared here
   64 |     size_t ret;
      |            ^~~
  CCLD     libasn1print.la
make[2]: Leaving directory '/home/pespin/dev/sysmocom/build/new/tmpdir/asn1c/libasn1print'
mouse07410 commented 4 months ago

Let me look into it. Or feel free to submit a PR.

pespin commented 4 months ago

@mouse07410 I'm not really currently working on related topics nowadays, so I don't think I'll have time to look into these soon, better if you can have a look.

mouse07410 commented 4 months ago

Closed by commit #2950727

pespin commented 4 months ago

I confirm I no longer see the warning when building.