This patch update eliminates the warnings by -Wall and -Wextra on both GCC
11 and Clang 19, fixes an incorrect return value error in _chkparg()
effecting every checked subroutine, and improves the safety of some overlooked
signed and unsigned comparisons.
- Correctly cast
ito unsigned in_findnextof(). - Correctly cast
ito unsigned in_findnextnotof(). - Added braces to nested
if-while-ifin_findnextnotof()to sate GCC. - Fixed missing
returnkeyword in_chkparg()in the case that
CREMPTYPATHshould be returned becausepathisNULLornpis zero. - Changed type of
curin_pathnth_i()to unsigned to fix signed-unsigned
comparison casting ambiguity. - In
crpathisroot()andcrpathisabs()now explicitly testing thatiis
non-negative and then correctly casting to unsigned for comparison with the
result ofstrnlen(). - Changed type of
jincrpathtrivial()to unsigned to fix signed-unsigned
comparison casting ambiguity. - Correctly cast
ito unsigned incrpathtrivial(). - Removed unused variable
jfromcrpathcount(). - Correctly cast
ito unsigned incrpathcount(). - Added extra parentheses to assignment in
ifto sate GCC incrpathlast(). - Added extra parentheses to assignment in
ifto sate GCC incrpathbase(). - Correctly cast
npto signed incrpathbase(). - Removed unused variable
rincrpathext(). - Added extra parentheses to assignment in
ifto sate GCC incrpathhead(). - Added extra parentheses to assignment in
ifto sate GCC incrpathtail(). - Added extra parentheses to assignment in
ifto sate GCC incrpathnth(). - Removed unused subroutine
_isach(). - Correctly cast
npto signed in_getpathsz(). - Changed type of
kin_scanpaths()to unsigned to fix signed-unsigned
comparison casting ambiguity. - Added extra parentheses to assignment in
ifto sate GCC in_scanpaths(). - Casting
nptovoidin_accumpart()to portably mark it as unused. - Casting
npathstovoidin_accumpath()to portably mark it as unused. - Changed type of
kin_catpaths()to unsigned to fix signed-unsigned
comparison casting ambiguity. - Changed type of
kincrvpathcat()to unsigned to fix signed-unsigned
comparison casting ambiguity. - Rolled version to 1.0.2.
- No longer using
stderrin example program in thecrpathnth()test.
This patch update eliminates the warnings by `-Wall` and `-Wextra` on both GCC
11 and Clang 19, fixes an incorrect return value error in `_chkparg()`
effecting every checked subroutine, and improves the safety of some overlooked
signed and unsigned comparisons.
- Correctly cast `i` to unsigned in `_findnextof()`.
- Correctly cast `i` to unsigned in `_findnextnotof()`.
- Added braces to nested `if-while-if` in `_findnextnotof()` to sate GCC.
- Fixed missing `return` keyword in `_chkparg()` in the case that
`CREMPTYPATH` should be returned because `path` is `NULL` or `np` is zero.
- Changed type of `cur` in `_pathnth_i()` to unsigned to fix signed-unsigned
comparison casting ambiguity.
- In `crpathisroot()` and `crpathisabs()` now explicitly testing that `i` is
non-negative and then correctly casting to unsigned for comparison with the
result of `strnlen()`.
- Changed type of `j` in `crpathtrivial()` to unsigned to fix signed-unsigned
comparison casting ambiguity.
- Correctly cast `i` to unsigned in `crpathtrivial()`.
- Removed unused variable `j` from `crpathcount()`.
- Correctly cast `i` to unsigned in `crpathcount()`.
- Added extra parentheses to assignment in `if` to sate GCC in `crpathlast()`.
- Added extra parentheses to assignment in `if` to sate GCC in `crpathbase()`.
- Correctly cast `np` to signed in `crpathbase()`.
- Removed unused variable `r` in `crpathext()`.
- Added extra parentheses to assignment in `if` to sate GCC in `crpathhead()`.
- Added extra parentheses to assignment in `if` to sate GCC in `crpathtail()`.
- Added extra parentheses to assignment in `if` to sate GCC in `crpathnth()`.
- Removed unused subroutine `_isach()`.
- Correctly cast `np` to signed in `_getpathsz()`.
- Changed type of `k` in `_scanpaths()` to unsigned to fix signed-unsigned
comparison casting ambiguity.
- Added extra parentheses to assignment in `if` to sate GCC in `_scanpaths()`.
- Casting `np` to `void` in `_accumpart()` to portably mark it as unused.
- Casting `npaths` to `void` in `_accumpath()` to portably mark it as unused.
- Changed type of `k` in `_catpaths()` to unsigned to fix signed-unsigned
comparison casting ambiguity.
- Changed type of `k` in `crvpathcat()` to unsigned to fix signed-unsigned
comparison casting ambiguity.
- Rolled version to 1.0.2.
- No longer using `stderr` in example program in the `crpathnth()` test.