Skip to content

Fixed some warnings from the new cppcheck 2.19 - #112

Merged
hjmjohnson merged 2 commits into
masterfrom
cppcheck2.19
Oct 13, 2026
Merged

hjmjohnson merged 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.

@hjmjohnson
hjmjohnson marked this pull request as ready for review September 24, 2026 12:17
seanm added 2 commits October 6, 2026 09:34
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)

@seanm seanm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was authored by me, so someone else ought to approve.

I guess @hjmjohnson does since he merged it previously, but I'll give others a chance before merging in a few days...

@hjmjohnson
hjmjohnson merged commit 3627eaa into master Oct 13, 2026
4 checks passed
@hjmjohnson
hjmjohnson deleted the cppcheck2.19 branch October 13, 2026 12:13
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