From 1e4d9a556adc32115fc97a24e06b31e03d2b41a2 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Mon, 21 Sep 2026 19:16:56 -0500 Subject: [PATCH 1/2] COMP: Install the tools the analysis jobs actually invoke Two of the five Build and Test jobs have never run to completion. sanitize-clang-linux invokes scan-build, which lives in clang-tools and was not installed, so the job exits 127 before configuring. rel-clang-macos asks brew for "sed", which is not a formula; brew fails the step and the job exits 1 before configuring. The GNU sed the dashboard scripts expect is gnu-sed. Both predate the workflow's first successful run, so neither has regressed; the trigger named the wrong branch until recently and the jobs never executed. --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e2bd685b..3bb63fbe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -98,12 +98,12 @@ jobs: if: runner.os == 'Linux' run: | sudo apt-get update - sudo apt-get install -y cmake valgrind help2man + sudo apt-get install -y cmake valgrind help2man clang-tools - name: Install Dependencies (macOS) if: runner.os == 'macOS' run: | - brew install cmake sed help2man + brew install cmake gnu-sed help2man - name: Set Compiler and Flags run: | From a0220c01b99bd6f393df1fc147e77e05fc25efa4 Mon Sep 17 00:00:00 2001 From: "Gabriel A. Devenyi" Date: Fri, 14 Aug 2026 23:08:32 -0400 Subject: [PATCH 2/2] BUG: Fix signed/unsigned comparisons in the nifti tools Three -Wsign-compare warnings, each comparing a signed value against an unsigned one, where the signed operand is silently converted and a negative value would compare as enormous. nifti1_tool.c, nifti_tool.c, fill_cmd_string() `len < 0 || len >= remain`, len an int, remain a size_t. The `len < 0` test short-circuits first, so the conversion could not actually misfire, but the comparison relies on that ordering to be correct. Made explicit, matching the idiom used a few lines above. nifti_tool.c, read_file_text() `bytes != len64`, size_t against int64_t. len64 is validated as > 0 and <= INT_MAX immediately above, so the cast is lossless. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01KSPnbwpDjVcAYqDdVqLkMU --- nifti2/nifti_tool.c | 4 ++-- niftilib/nifti1_tool.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nifti2/nifti_tool.c b/nifti2/nifti_tool.c index 0c34d081..7dfa3272 100644 --- a/nifti2/nifti_tool.c +++ b/nifti2/nifti_tool.c @@ -885,7 +885,7 @@ int fill_cmd_string( nt_opts * opts, int argc, const char * argv[]) if( has_space ) len = snprintf(cp, remain, " '%s'", argv[ac]); else len = snprintf(cp, remain, " %s", argv[ac]); - if( len < 0 || len >= remain ) { + if( len < 0 || (size_t)len >= remain ) { fprintf(stderr,"FCS: error parsing command, continuing...\n"); return 1; } @@ -2368,7 +2368,7 @@ static char * read_file_text(const char * filename, int * length) bytes = fread(text, sizeof(char), len64, fp); fclose(fp); /* in any case */ - if( bytes != len64 ) { + if( bytes != (size_t)len64 ) { fprintf(stderr,"** RFT: read only %zu of %" PRId64 " bytes from %s\n", bytes, len64, filename); free(text); diff --git a/niftilib/nifti1_tool.c b/niftilib/nifti1_tool.c index d6e143e5..7bd422b1 100644 --- a/niftilib/nifti1_tool.c +++ b/niftilib/nifti1_tool.c @@ -723,7 +723,7 @@ int fill_cmd_string( nt_opts * opts, int argc, const char * argv[]) if( has_space ) len = snprintf(cp, remain, " '%s'", argv[ac]); else len = snprintf(cp, remain, " %s", argv[ac]); - if( len < 0 || len >= remain ) { + if( len < 0 || (size_t)len >= remain ) { fprintf(stderr,"FCS: error parsing command, continuing...\n"); return 1; }