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: | 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; }