1
3
Fork
You've already forked crpath
1

This is the staging commit for patch version 1.0.2. #4

Merged
croil merged 1 commit from staging into main 2026年03月14日 17:19:46 +01:00
Owner
Copy link

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.
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.
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.
Author
Owner
Copy link

Alright, patch version 1.0.2 is ready to merge through the UI. The mess caused by the manual merge of 1.0.1 is cleaned up.

Alright, patch version 1.0.2 is ready to merge through the UI. The mess caused by the manual merge of 1.0.1 is cleaned up.
croil deleted branch staging 2026年03月14日 17:19:47 +01:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
Compat/Breaking
Breaking change that won't be backward compatible
Kind/Bug
Something is not working
Kind/Documentation
Documentation changes
Kind/Enhancement
Improve existing functionality
Kind/Feature
New functionality
Kind/Security
This is security issue
Kind/Testing
Issue or pull request related to testing
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
Resolved
Marks the issue as resolved.
Reviewed
Confirmed
Issue has been confirmed
Reviewed
Duplicate
This issue or pull request already exists
Reviewed
Invalid
Invalid issue
Reviewed
Won't Fix
This issue won't be fixed
Status
Abandoned
Somebody has started to work on this but abandoned work
Status
Blocked
Something is blocking this issue or pull request
Status
Need More Info
Feedback is required to reproduce issue or to continue work
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
croil/crpath!4
Reference in a new issue
croil/crpath
No description provided.
Delete branch "staging"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?