clang 19 static analyzer run & clean-up #516
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
altairsim/srcsim/simcfg.c,
cpmsim/srcsim/simio.c,
cromemcosim/srcsim/simcfg.c,
imsaisim/srcsim/simcfg.c,
intelmdssim/srcsim/simcfg.c,
mosteksim/srcsim/simcfg.c:
Changed
to
since s was sometimes manipulated inside the loop.
cpmsim/srcsim/simmem.h:
Changed memrdr to match memwrt, no functional change. Analyzer complained about a useless assignment.
cpmsim/srctools/bin2hex.c,
cpmsim/srctools/mkdskimg.c,
frontpanel/jpeg.c:
Unclosed files, also reformatted bin2hex.c.
z80core/simmain.c:
Re-did save_core and load_core since the analyzer complained about unchecked errors.
iodevices/altair-88-dcdd.c:
Renamed dsk_check to dsk_open and leave file open on success. Analyzer complained about possible open(2) fail in altair_dsk_data_out and altair_dsk_data_in.
frontpanel/lpanel.c:
Fix possible memory leak.
Rest of files: Changed
&buf[0]
tobuf
, for strings and buffers, since this looks more natural in C.