nifti update - #5380
Conversation
The ThirdParty module is not subject to the coding styles enforced by ITK.
Code extracted from:
https://github.com/InsightSoftwareConsortium/nifti_clib.git
at commit 943aacb42386d2ae2f778edff911c5a10179e299 (master).
# By NIFTI Upstream * upstream-nifti: nifti 2025-06-04 (943aacb4)
|
ghostflow's whitespace-related failures can be ignored. They could, and perhaps should, be addressed upstream. |
|
This PR adds 3 more CMake variables: |
|
I'm inclined to not expose them in ITK and hardcode their values to preserve previous behavior. |
| int skip = 0; /* counter to skip some of the arguments */ | ||
|
|
||
| /* get the first argument separately */ | ||
| len = snprintf( opts->command, sizeof(opts->command), |
There was a problem hiding this comment.
FYI, snprintf can return negative number, but len is now unsigned size_t
There was a problem hiding this comment.
I've never seen snprintf return a negative, but indeed the macOS man page says vaguely "These functions return a negative value if an error occurs" but does not say what kind of error could cause this... other sources say "If an encoding error occurs, a negative number is returned." nifticlib has a lot of ASCII-only assumptions already, so in practice I think this is nearly impossible.
But I could do a code review of all snprintf and use signed variables and check the error checking...
There was a problem hiding this comment.
…eConsortium/nifti-update nifti update
…eConsortium/nifti-update nifti update
ENH: Update to latest nifti ThirdParty codebase
PR Checklist