Skip to content

Fixed some warnings from the new cppcheck 2.19 - #112

Open
hjmjohnson wants to merge 2 commits into
masterfrom
cppcheck2.19
Open

hjmjohnson wants to merge 2 commits into
masterfrom
cppcheck2.19

Conversation

@hjmjohnson

Copy link
Copy Markdown
Member

Re-submission of #23, reverted from master on 2026-09-24 so it can be
reviewed before merging. Content is unchanged from the original.

Base: master. Independent: nothing has to land before it.

Commits
  • BUG: Check the allocation in nifti_intent_code before copying into it
  • STYLE: Drop the unreachable returns after FSLIOERR

Ordering for all the re-submitted work is tracked in #84.

cppcheck 2.19 nullPointerOutOfMemory: the uppercase copy of the name
was written into an unchecked malloc result.  Return -1, the same
value the function already uses for an unrecognized name.

(cherry picked from commit c2d181e)
cppcheck 2.19 unreachableCode: FSLIOERR ends in exit(EXIT_FAILURE), so
the return statements following it in FslReadAllVolumes and
FslReadHeader can never run.

(cherry picked from commit f5f3766)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants