From baac6e91e62b73578c895bc3adb0a56cac5f6c6a Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 15:41:09 -0500 Subject: [PATCH 1/7] removed double semicolon on files I could --- .../Common/src/itkBuildInformation.cxx.in | 4 +- ...UGradientNDAnisotropicDiffusionFunction.cl | 2 +- .../HDF5/src/itkhdf5/c++/src/h5c++.in | 60 +++++++++---------- .../HDF5/src/itkhdf5/config/cmake/libh5cc.in | 14 ++--- Utilities/GitSetup/git-review-push | 12 ++-- Utilities/Hooks/kw-pre-commit | 44 +++++++------- Utilities/Hooks/pre-commit-style.bash | 8 +-- Utilities/Maintenance/ApplyScriptToRemotes.sh | 4 +- .../Maintenance/FindPython3_ModernizeCMake.sh | 4 +- Utilities/Maintenance/SourceTarball.bash | 20 +++---- Utilities/Maintenance/UpdateRemoteModules.sh | 4 +- ...UpdateRequiredITKVersionInRemoteModules.sh | 4 +- .../Maintenance/UpdateTestingMacrosNames.sh | 4 +- Utilities/Maintenance/clang-format.bash | 34 +++++------ Utilities/Maintenance/cmake-format.bash | 34 +++++------ 15 files changed, 126 insertions(+), 126 deletions(-) diff --git a/Modules/Core/Common/src/itkBuildInformation.cxx.in b/Modules/Core/Common/src/itkBuildInformation.cxx.in index 6e70541cd56..2fed7cf4191 100644 --- a/Modules/Core/Common/src/itkBuildInformation.cxx.in +++ b/Modules/Core/Common/src/itkBuildInformation.cxx.in @@ -87,7 +87,7 @@ BuildInformation::GetValue(const MapKeyType & key) { return it->second.m_Value; } - return {};; + return {}; } const BuildInformation::MapValueDescriptionType @@ -100,7 +100,7 @@ BuildInformation::GetDescription(const MapKeyType & key) { return it->second.m_Description; } - return {};; + return {}; } const std::vector< BuildInformation::MapKeyType > diff --git a/Modules/Filtering/GPUAnisotropicSmoothing/src/GPUGradientNDAnisotropicDiffusionFunction.cl b/Modules/Filtering/GPUAnisotropicSmoothing/src/GPUGradientNDAnisotropicDiffusionFunction.cl index 41e784bf51f..fa153162aad 100644 --- a/Modules/Filtering/GPUAnisotropicSmoothing/src/GPUGradientNDAnisotropicDiffusionFunction.cl +++ b/Modules/Filtering/GPUAnisotropicSmoothing/src/GPUGradientNDAnisotropicDiffusionFunction.cl @@ -172,7 +172,7 @@ __kernel void ComputeUpdate(__global const INPIXELTYPE *in, __global BUFPIXELTYP // centralized derivatives, half directonal derivatives float dx[3], dx_f, dx_b, delta, Cx, Cxd; - unsigned int tidx, tx, ty, tz;; + unsigned int tidx, tx, ty, tz; // shared memory __local float sm[BLOCK_SIZE+2][BLOCK_SIZE+2][BLOCK_SIZE+2]; diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in index f7ef5195490..8db7c50d8d6 100755 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in @@ -172,7 +172,7 @@ fi case "$CXX" in gcc) kind="gcc" - ;; + ; mpicc|mpcc|mpicc_r) # Is this gcc masquarading as an MPI compiler? if test "`${CXX} -v 2>&1 | sed -n 2p | cut -c1-3`" = "gcc"; then @@ -181,10 +181,10 @@ case "$CXX" in # Nope kind="$host_os" fi - ;; + ; *) kind="$host_os" - ;; + ; esac for arg in $@ ; do @@ -205,7 +205,7 @@ for arg in $@ ; do do_link="no" dash_c="-c" - ;; + ; -o) if test "x$dash_c" = "x-c"; then compile_args="$compile_args $arg" @@ -214,45 +214,45 @@ for arg in $@ ; do do_link="yes" get_output_file="yes" fi - ;; + ; -E|-M|-MT) compile_args="$compile_args $arg" dash_c="-c" do_link="no" - ;; + ; -l*) libraries=" $libraries $arg " - ;; + ; -prefix=*) prefix="`expr "$arg" : '-prefix=\(.*\)'`" - ;; + ; -echo) set -x - ;; + ; -show) SHOW="echo" - ;; + ; -showconfig) showconfigure exit $status - ;; + ; -shlib) USE_SHARED_LIB="yes" - ;; + ; -noshlib) USE_SHARED_LIB="no" - ;; + ; -help) usage - ;; + ; *\"*) qarg="'"$arg"'" qargs="$qargs $qarg" - ;; + ; *\'*) qarg='"'"$arg"'"' qargs="$qargs $qarg" - ;; + ; *) if [ -s "$arg" ] ; then ext=`expr "$arg" : '.*\(\..*\)'` @@ -280,7 +280,7 @@ for arg in $@ ; do compile_args="$compile_args $arg" link_args="$link_args $arg" fi - ;; + ; esac done link_args="$link_args $qargs" @@ -312,15 +312,15 @@ if test "x$do_link" = "xyes"; then # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags. # It appears to want none of them specified. case "$host_os" in - darwin*) flag="" ;; - *) flag="-Wl,-rpath -Wl," ;; + darwin*) flag="" ; + *) flag="-Wl,-rpath -Wl," ; esac - ;; - hpux*) flag="-Wl,+b -Wl," ;; - freebsd*|solaris*) flag="-R" ;; - rs6000*|aix*) flag="-L" ;; - sgi) flag="-rpath " ;; - *) flag="" ;; + ; + hpux*) flag="-Wl,+b -Wl," ; + freebsd*|solaris*) flag="-R" ; + rs6000*|aix*) flag="-L" ; + sgi) flag="-rpath " ; + *) flag="" ; esac if test -n "$flag"; then @@ -334,19 +334,19 @@ if test "x$do_link" = "xyes"; then case "$lib" in -lhdf5) new_libraries="$new_libraries ${libdir}/libhdf5.a" - ;; + ; -lhdf5_hl) new_libraries="$new_libraries ${libdir}/libhdf5_hl.a" - ;; + ; -lhdf5_cpp) new_libraries="$new_libraries ${libdir}/libhdf5_cpp.a" - ;; + ; -lhdf5_hl_cpp) new_libraries="$new_libraries ${libdir}/libhdf5_hl_cpp.a" - ;; + ; *) new_libraries="$new_libraries $lib" - ;; + ; esac done libraries="$new_libraries" diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in index c950c30722e..06fc2365727 100755 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in @@ -14,8 +14,8 @@ prg=$0 if [ ! -e "$prg" ]; then case $prg in - (*/*) exit 1;; - (*) prg=$(command -v -- "$prg") || exit;; + (*/*) exit 1; + (*) prg=$(command -v -- "$prg") || exit; esac fi dir=$( @@ -64,23 +64,23 @@ for arg in $@ ; do -showconfig) showconfigure exit $status - ;; + ; -show) echo @_PKG_CONFIG_COMPILER@ $@ `pkg-config $pc_args --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@` exit $status - ;; + ; -help) usage exit $status - ;; + ; --*) # gather pkg-config specific options pc_args="$pc_args $arg" - ;; + ; *) @_PKG_CONFIG_COMPILER@ $@ `pkg-config $pc_args --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@` status=$? exit $status - ;; + ; esac done diff --git a/Utilities/GitSetup/git-review-push b/Utilities/GitSetup/git-review-push index 3530c69fd42..547c897dc42 100755 --- a/Utilities/GitSetup/git-review-push +++ b/Utilities/GitSetup/git-review-push @@ -38,12 +38,12 @@ force='' # Parse the command line options. while test $# != 0; do case "$1" in - --no-topic) no_topic=1 ;; - --force) force=--force ;; - --dry-run) dry_run=--dry-run ;; - --) shift; break ;; - -*) usage ;; - *) test -z "$remote" || usage ; remote="$1" ;; + --no-topic) no_topic=1 ; + --force) force=--force ; + --dry-run) dry_run=--dry-run ; + --) shift; break ; + -*) usage ; + *) test -z "$remote" || usage ; remote="$1" ; esac shift done diff --git a/Utilities/Hooks/kw-pre-commit b/Utilities/Hooks/kw-pre-commit index a7807d9b1bf..7cbedaa7cf7 100755 --- a/Utilities/Hooks/kw-pre-commit +++ b/Utilities/Hooks/kw-pre-commit @@ -99,11 +99,11 @@ check_whitespace() { sed 's/^[^:]*: whitespace: //') if $approx_tab_in_indent; then case ",$ws," in - *,tab-in-indent,*) check_tab "$1" ;; + *,tab-in-indent,*) check_tab "$1" ; esac fi case ",$ws," in - *,no-lf-at-eof,*) check_no_lf_at_eof "$1" ;; + *,no-lf-at-eof,*) check_no_lf_at_eof "$1" ; esac } bad=$(git diff-index --name-only --cached $against -- | @@ -116,10 +116,10 @@ test -z "$bad" || die "$bad" # Check file modes and sizes. mode_looks_exe() { case "$1" in - *.bat) return 0 ;; - *.cmd) return 0 ;; - *.exe) return 0 ;; - *.com) return 0 ;; + *.bat) return 0 ; + *.cmd) return 0 ; + *.exe) return 0 ; + *.com) return 0 ; esac git cat-file blob "$2" | head -1 | grep "^#!/" > /dev/null } @@ -150,10 +150,10 @@ mode_non_file () { } check_mode() { case "$dst_mode" in - 100755) mode_looks_exe "$file" "$dst_obj" || mode_bad_exe ;; - 100644) mode_looks_exe "$file" "$dst_obj" && mode_not_exe ;; - 160000) ;; - *) mode_non_file ;; + 100755) mode_looks_exe "$file" "$dst_obj" || mode_bad_exe ; + 100644) mode_looks_exe "$file" "$dst_obj" && mode_not_exe ; + 160000) ; + *) mode_non_file ; esac } @@ -200,25 +200,25 @@ check_size() { test "$dst_obj" != "$zero" || return max_KiB=$(git check-attr hooks.MaxObjectKiB -- "$file" | sed 's/^[^:]*: hooks.MaxObjectKiB: //') case "$max_KiB" in - 'unset') ;; - 'set') ;; - 'unspecified') ;; - *) size_validate_max_KiB || return ;; + 'unset') ; + 'set') ; + 'unspecified') ; + *) size_validate_max_KiB || return ; esac max_bytes=$(git check-attr hooks-max-size -- "$file" | sed 's/^[^:]*: hooks-max-size: //') case "$max_bytes" in - 'unset') return ;; # No maximum for this object. - 'set') max_bytes="$size_max_bytes" ;; # Use local default. + 'unset') return ; # No maximum for this object. + 'set') max_bytes="$size_max_bytes" ; # Use local default. 'unspecified') # Fall back to max KiB setting. case "$max_KiB" in - 'unset') return ;; # No maximum for this object. - 'set') max_bytes=$(("${size_max_KiB}" * 1024)) ;; # Use local default. - 'unspecified') max_bytes="$size_max_bytes" ;; # Use local default. - *) max_bytes=$(("${max_KiB}" * 1024)) ;; + 'unset') return ; # No maximum for this object. + 'set') max_bytes=$(("${size_max_KiB}" * 1024)) ; # Use local default. + 'unspecified') max_bytes="$size_max_bytes" ; # Use local default. + *) max_bytes=$(("${max_KiB}" * 1024)) ; esac - ;; - *) size_validate_max_bytes || return ;; + ; + *) size_validate_max_bytes || return ; esac if test "$max_bytes" -gt "0"; then file_bytes=$(git cat-file -s "$dst_obj") diff --git a/Utilities/Hooks/pre-commit-style.bash b/Utilities/Hooks/pre-commit-style.bash index 671bfb1f3af..be45bd2a24f 100755 --- a/Utilities/Hooks/pre-commit-style.bash +++ b/Utilities/Hooks/pre-commit-style.bash @@ -48,10 +48,10 @@ run_style_on_file() { sed 's/^[^:]*: hooks.style: //') has_style_attr=1 case "$style" in - 'unset') has_style_attr=1 ;; - 'set') has_style_attr=0 ;; - 'unspecified') has_style_attr=1 ;; - *) echo ",$style," | grep -iq ",$2," && has_style_attr=0 ;; + 'unset') has_style_attr=1 ; + 'set') has_style_attr=0 ; + 'unspecified') has_style_attr=1 ; + *) echo ",$style," | grep -iq ",$2," && has_style_attr=0 ; esac if ! git diff-files --quiet -- "$1" && test $has_style_attr -eq 0; then # A way to always allow skipping. diff --git a/Utilities/Maintenance/ApplyScriptToRemotes.sh b/Utilities/Maintenance/ApplyScriptToRemotes.sh index a65370169f9..030219692d8 100755 --- a/Utilities/Maintenance/ApplyScriptToRemotes.sh +++ b/Utilities/Maintenance/ApplyScriptToRemotes.sh @@ -69,9 +69,9 @@ do "-h"|"--help") shift; help=true - break;; + break; *) - break;; + break; esac done diff --git a/Utilities/Maintenance/FindPython3_ModernizeCMake.sh b/Utilities/Maintenance/FindPython3_ModernizeCMake.sh index 805af34ca94..d71254a6fd2 100755 --- a/Utilities/Maintenance/FindPython3_ModernizeCMake.sh +++ b/Utilities/Maintenance/FindPython3_ModernizeCMake.sh @@ -40,9 +40,9 @@ do "-h"|"--help") shift; help=true - break;; + break; *) - break;; + break; esac done diff --git a/Utilities/Maintenance/SourceTarball.bash b/Utilities/Maintenance/SourceTarball.bash index 780933a3134..889b8b25e05 100755 --- a/Utilities/Maintenance/SourceTarball.bash +++ b/Utilities/Maintenance/SourceTarball.bash @@ -39,8 +39,8 @@ find_data_objects() { egrep '\.(cid)$' | while read mode type obj path; do case "$path" in - *.cid) echo CID/$(git cat-file blob $obj) ;; - *) die "Unknown ExternalData content link: $path" ;; + *.cid) echo CID/$(git cat-file blob $obj) ; + *) die "Unknown ExternalData content link: $path" ; esac done | sort | uniq return_pipe_status @@ -127,14 +127,14 @@ verbose= # Parse command line options. while test $# != 0; do case "$1" in - --tgz) formats="$formats tgz" ;; - --txz) formats="$formats txz" ;; - --zip) formats="$formats zip" ;; - --verbose) verbose=-v ;; - --) shift; break ;; - -v) shift; version="$1" ;; - -*) usage ;; - *) test -z "$commit" && commit="$1" || usage ;; + --tgz) formats="$formats tgz" ; + --txz) formats="$formats txz" ; + --zip) formats="$formats zip" ; + --verbose) verbose=-v ; + --) shift; break ; + -v) shift; version="$1" ; + -*) usage ; + *) test -z "$commit" && commit="$1" || usage ; esac shift done diff --git a/Utilities/Maintenance/UpdateRemoteModules.sh b/Utilities/Maintenance/UpdateRemoteModules.sh index 4567f8e174f..68bb6f52d29 100755 --- a/Utilities/Maintenance/UpdateRemoteModules.sh +++ b/Utilities/Maintenance/UpdateRemoteModules.sh @@ -51,9 +51,9 @@ do "-h"|"--help") shift; help=true - break;; + break; *) - break;; + break; esac done diff --git a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh index 9aa025e145c..61cb40fd722 100755 --- a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh +++ b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh @@ -54,9 +54,9 @@ do "-h"|"--help") shift; help=true - break;; + break; *) - break;; + break esac done diff --git a/Utilities/Maintenance/UpdateTestingMacrosNames.sh b/Utilities/Maintenance/UpdateTestingMacrosNames.sh index 88f6da47b95..65e055f2c93 100755 --- a/Utilities/Maintenance/UpdateTestingMacrosNames.sh +++ b/Utilities/Maintenance/UpdateTestingMacrosNames.sh @@ -46,9 +46,9 @@ do "-h"|"--help") shift; help=true - break;; + break; *) - break;; + break; esac done diff --git a/Utilities/Maintenance/clang-format.bash b/Utilities/Maintenance/clang-format.bash index 502a1b9257c..c06b29ab14b 100755 --- a/Utilities/Maintenance/clang-format.bash +++ b/Utilities/Maintenance/clang-format.bash @@ -64,16 +64,16 @@ clang_format='' mode='' while test "$#" != 0; do case "$1" in - --amend) mode="amend" ;; - --cached) mode="cached" ;; - --clang-format) shift; clang_format="$1" ;; - --help) echo "$help"; exit 0 ;; - --modified) mode="modified" ;; - --last) mode="last" ;; - --tracked) mode="tracked" ;; - --) shift ; break ;; - -*) die "$usage" ;; - *) break ;; + --amend) mode="amend" ; + --cached) mode="cached" ; + --clang-format) shift; clang_format="$1" ; + --help) echo "$help"; exit 0 ; + --modified) mode="modified" ; + --last) mode="last" ; + --tracked) mode="tracked" ; + --) shift ; break ; + -*) die "$usage" ; + *) break ; esac shift done @@ -106,13 +106,13 @@ fi # Select listing mode. case "$mode" in - '') echo "$usage"; exit 0 ;; - amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ;; - cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ;; - modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ;; - last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ;; - tracked) git_ls='git ls-files' ;; - *) die "invalid mode: $mode" ;; + '') echo "$usage"; exit 0 ; + amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ; + cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ; + modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ; + last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ; + tracked) git_ls='git ls-files' ; + *) die "invalid mode: $mode" ; esac # List files as selected above. diff --git a/Utilities/Maintenance/cmake-format.bash b/Utilities/Maintenance/cmake-format.bash index 37d19c5f37c..fce5cff3931 100755 --- a/Utilities/Maintenance/cmake-format.bash +++ b/Utilities/Maintenance/cmake-format.bash @@ -64,16 +64,16 @@ cmake_format='' mode='' while test "$#" != 0; do case "$1" in - --amend) mode="amend" ;; - --cached) mode="cached" ;; - --cmake-format) shift; cmake_format="$1" ;; - --help) echo "$help"; exit 0 ;; - --modified) mode="modified" ;; - --last) mode="last" ;; - --tracked) mode="tracked" ;; - --) shift ; break ;; - -*) die "$usage" ;; - *) break ;; + --amend) mode="amend" ; + --cached) mode="cached" ; + --cmake-format) shift; cmake_format="$1" ; + --help) echo "$help"; exit 0 ; + --modified) mode="modified" ; + --last) mode="last" ; + --tracked) mode="tracked" ; + --) shift ; break ; + -*) die "$usage" ; + *) break ; esac shift done @@ -100,13 +100,13 @@ fi # Select listing mode. case "$mode" in - '') echo "$usage"; exit 0 ;; - amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ;; - cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ;; - modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ;; - last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ;; - tracked) git_ls='git ls-files' ;; - *) die "invalid mode: $mode" ;; + '') echo "$usage"; exit 0 ; + amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ; + cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ; + modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ; + last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ; + tracked) git_ls='git ls-files' ; + *) die "invalid mode: $mode" ; esac # List files as selected above. From a093a5b549d60744bba5e2391dd0247fa9090f01 Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:05:47 -0500 Subject: [PATCH 2/7] undid changes for bash scripts --- Utilities/Maintenance/ApplyScriptToRemotes.sh | 4 +-- .../Maintenance/FindPython3_ModernizeCMake.sh | 4 +-- Utilities/Maintenance/SourceTarball.bash | 4 +-- Utilities/Maintenance/UpdateRemoteModules.sh | 4 +-- ...UpdateRequiredITKVersionInRemoteModules.sh | 4 +-- .../Maintenance/UpdateTestingMacrosNames.sh | 4 +-- Utilities/Maintenance/clang-format.bash | 18 +++++------ Utilities/Maintenance/cmake-format.bash | 32 +++++++++---------- 8 files changed, 37 insertions(+), 37 deletions(-) diff --git a/Utilities/Maintenance/ApplyScriptToRemotes.sh b/Utilities/Maintenance/ApplyScriptToRemotes.sh index 030219692d8..a65370169f9 100755 --- a/Utilities/Maintenance/ApplyScriptToRemotes.sh +++ b/Utilities/Maintenance/ApplyScriptToRemotes.sh @@ -69,9 +69,9 @@ do "-h"|"--help") shift; help=true - break; + break;; *) - break; + break;; esac done diff --git a/Utilities/Maintenance/FindPython3_ModernizeCMake.sh b/Utilities/Maintenance/FindPython3_ModernizeCMake.sh index d71254a6fd2..805af34ca94 100755 --- a/Utilities/Maintenance/FindPython3_ModernizeCMake.sh +++ b/Utilities/Maintenance/FindPython3_ModernizeCMake.sh @@ -40,9 +40,9 @@ do "-h"|"--help") shift; help=true - break; + break;; *) - break; + break;; esac done diff --git a/Utilities/Maintenance/SourceTarball.bash b/Utilities/Maintenance/SourceTarball.bash index 889b8b25e05..66b44c19eaa 100755 --- a/Utilities/Maintenance/SourceTarball.bash +++ b/Utilities/Maintenance/SourceTarball.bash @@ -39,8 +39,8 @@ find_data_objects() { egrep '\.(cid)$' | while read mode type obj path; do case "$path" in - *.cid) echo CID/$(git cat-file blob $obj) ; - *) die "Unknown ExternalData content link: $path" ; + *.cid) echo CID/$(git cat-file blob $obj) ;; + *) die "Unknown ExternalData content link: $path" ;; esac done | sort | uniq return_pipe_status diff --git a/Utilities/Maintenance/UpdateRemoteModules.sh b/Utilities/Maintenance/UpdateRemoteModules.sh index 68bb6f52d29..4567f8e174f 100755 --- a/Utilities/Maintenance/UpdateRemoteModules.sh +++ b/Utilities/Maintenance/UpdateRemoteModules.sh @@ -51,9 +51,9 @@ do "-h"|"--help") shift; help=true - break; + break;; *) - break; + break;; esac done diff --git a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh index 61cb40fd722..9aa025e145c 100755 --- a/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh +++ b/Utilities/Maintenance/UpdateRequiredITKVersionInRemoteModules.sh @@ -54,9 +54,9 @@ do "-h"|"--help") shift; help=true - break; + break;; *) - break + break;; esac done diff --git a/Utilities/Maintenance/UpdateTestingMacrosNames.sh b/Utilities/Maintenance/UpdateTestingMacrosNames.sh index 65e055f2c93..88f6da47b95 100755 --- a/Utilities/Maintenance/UpdateTestingMacrosNames.sh +++ b/Utilities/Maintenance/UpdateTestingMacrosNames.sh @@ -46,9 +46,9 @@ do "-h"|"--help") shift; help=true - break; + break;; *) - break; + break;; esac done diff --git a/Utilities/Maintenance/clang-format.bash b/Utilities/Maintenance/clang-format.bash index c06b29ab14b..89645d3b3fb 100755 --- a/Utilities/Maintenance/clang-format.bash +++ b/Utilities/Maintenance/clang-format.bash @@ -64,16 +64,16 @@ clang_format='' mode='' while test "$#" != 0; do case "$1" in - --amend) mode="amend" ; - --cached) mode="cached" ; - --clang-format) shift; clang_format="$1" ; - --help) echo "$help"; exit 0 ; + --amend) mode="amend" ;; + --cached) mode="cached" ;; + --clang-format) shift; clang_format="$1" ;; + --help) echo "$help"; exit 0 ;; --modified) mode="modified" ; - --last) mode="last" ; - --tracked) mode="tracked" ; - --) shift ; break ; - -*) die "$usage" ; - *) break ; + --last) mode="last" ;; + --tracked) mode="tracked" ;; + --) shift ; break ;; + -*) die "$usage" ;; + *) break ;; esac shift done diff --git a/Utilities/Maintenance/cmake-format.bash b/Utilities/Maintenance/cmake-format.bash index fce5cff3931..b33b130c9e9 100755 --- a/Utilities/Maintenance/cmake-format.bash +++ b/Utilities/Maintenance/cmake-format.bash @@ -64,16 +64,16 @@ cmake_format='' mode='' while test "$#" != 0; do case "$1" in - --amend) mode="amend" ; - --cached) mode="cached" ; - --cmake-format) shift; cmake_format="$1" ; - --help) echo "$help"; exit 0 ; - --modified) mode="modified" ; + --amend) mode="amend" ;; + --cached) mode="cached" ;; + --cmake-format) shift; cmake_format="$1" ;; + --help) echo "$help"; exit 0 ;; + --modified) mode="modified" ;; --last) mode="last" ; - --tracked) mode="tracked" ; - --) shift ; break ; - -*) die "$usage" ; - *) break ; + --tracked) mode="tracked" ;; + --) shift ; break ;; + -*) die "$usage" ;; + *) break ;; esac shift done @@ -100,13 +100,13 @@ fi # Select listing mode. case "$mode" in - '') echo "$usage"; exit 0 ; - amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ; - cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ; - modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ; - last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ; - tracked) git_ls='git ls-files' ; - *) die "invalid mode: $mode" ; + '') echo "$usage"; exit 0 ;; + amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ;; + cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ;; + modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ;; + last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ;; + tracked) git_ls='git ls-files' ;; + *) die "invalid mode: $mode" ;; esac # List files as selected above. From 522d0d4a345550f563dfbad4a8f42bf89594a801 Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:08:24 -0500 Subject: [PATCH 3/7] undid bash semicolon changes --- Utilities/Hooks/pre-commit-style.bash | 8 ++++---- Utilities/Maintenance/SourceTarball.bash | 16 ++++++++-------- Utilities/Maintenance/clang-format.bash | 16 ++++++++-------- Utilities/Maintenance/cmake-format.bash | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Utilities/Hooks/pre-commit-style.bash b/Utilities/Hooks/pre-commit-style.bash index be45bd2a24f..671bfb1f3af 100755 --- a/Utilities/Hooks/pre-commit-style.bash +++ b/Utilities/Hooks/pre-commit-style.bash @@ -48,10 +48,10 @@ run_style_on_file() { sed 's/^[^:]*: hooks.style: //') has_style_attr=1 case "$style" in - 'unset') has_style_attr=1 ; - 'set') has_style_attr=0 ; - 'unspecified') has_style_attr=1 ; - *) echo ",$style," | grep -iq ",$2," && has_style_attr=0 ; + 'unset') has_style_attr=1 ;; + 'set') has_style_attr=0 ;; + 'unspecified') has_style_attr=1 ;; + *) echo ",$style," | grep -iq ",$2," && has_style_attr=0 ;; esac if ! git diff-files --quiet -- "$1" && test $has_style_attr -eq 0; then # A way to always allow skipping. diff --git a/Utilities/Maintenance/SourceTarball.bash b/Utilities/Maintenance/SourceTarball.bash index 66b44c19eaa..780933a3134 100755 --- a/Utilities/Maintenance/SourceTarball.bash +++ b/Utilities/Maintenance/SourceTarball.bash @@ -127,14 +127,14 @@ verbose= # Parse command line options. while test $# != 0; do case "$1" in - --tgz) formats="$formats tgz" ; - --txz) formats="$formats txz" ; - --zip) formats="$formats zip" ; - --verbose) verbose=-v ; - --) shift; break ; - -v) shift; version="$1" ; - -*) usage ; - *) test -z "$commit" && commit="$1" || usage ; + --tgz) formats="$formats tgz" ;; + --txz) formats="$formats txz" ;; + --zip) formats="$formats zip" ;; + --verbose) verbose=-v ;; + --) shift; break ;; + -v) shift; version="$1" ;; + -*) usage ;; + *) test -z "$commit" && commit="$1" || usage ;; esac shift done diff --git a/Utilities/Maintenance/clang-format.bash b/Utilities/Maintenance/clang-format.bash index 89645d3b3fb..502a1b9257c 100755 --- a/Utilities/Maintenance/clang-format.bash +++ b/Utilities/Maintenance/clang-format.bash @@ -68,7 +68,7 @@ while test "$#" != 0; do --cached) mode="cached" ;; --clang-format) shift; clang_format="$1" ;; --help) echo "$help"; exit 0 ;; - --modified) mode="modified" ; + --modified) mode="modified" ;; --last) mode="last" ;; --tracked) mode="tracked" ;; --) shift ; break ;; @@ -106,13 +106,13 @@ fi # Select listing mode. case "$mode" in - '') echo "$usage"; exit 0 ; - amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ; - cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ; - modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ; - last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ; - tracked) git_ls='git ls-files' ; - *) die "invalid mode: $mode" ; + '') echo "$usage"; exit 0 ;; + amend) git_ls='git diff-tree --diff-filter=AM --name-only HEAD -r --no-commit-id' ;; + cached) git_ls='git diff-index --diff-filter=AM --name-only HEAD --cached' ;; + modified) git_ls='git diff-index --diff-filter=AM --name-only HEAD' ;; + last) git_ls='git diff-index --diff-filter=AM --name-only HEAD~1' ;; + tracked) git_ls='git ls-files' ;; + *) die "invalid mode: $mode" ;; esac # List files as selected above. diff --git a/Utilities/Maintenance/cmake-format.bash b/Utilities/Maintenance/cmake-format.bash index b33b130c9e9..37d19c5f37c 100755 --- a/Utilities/Maintenance/cmake-format.bash +++ b/Utilities/Maintenance/cmake-format.bash @@ -69,7 +69,7 @@ while test "$#" != 0; do --cmake-format) shift; cmake_format="$1" ;; --help) echo "$help"; exit 0 ;; --modified) mode="modified" ;; - --last) mode="last" ; + --last) mode="last" ;; --tracked) mode="tracked" ;; --) shift ; break ;; -*) die "$usage" ;; From 78dc69b88db11c89b6a9d9b749d790c8981d6bdd Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:10:34 -0500 Subject: [PATCH 4/7] made some additional undo changes --- Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in index 8db7c50d8d6..55182c4c05d 100755 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in @@ -172,7 +172,7 @@ fi case "$CXX" in gcc) kind="gcc" - ; + ;; mpicc|mpcc|mpicc_r) # Is this gcc masquarading as an MPI compiler? if test "`${CXX} -v 2>&1 | sed -n 2p | cut -c1-3`" = "gcc"; then @@ -181,10 +181,10 @@ case "$CXX" in # Nope kind="$host_os" fi - ; + ;; *) kind="$host_os" - ; + ;; esac for arg in $@ ; do From 8b92b513d476a8d3a6c31dee451cf63426b1fd70 Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:14:30 -0500 Subject: [PATCH 5/7] undid change --- .../HDF5/src/itkhdf5/c++/src/h5c++.in | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in index 55182c4c05d..f7ef5195490 100755 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/c++/src/h5c++.in @@ -205,7 +205,7 @@ for arg in $@ ; do do_link="no" dash_c="-c" - ; + ;; -o) if test "x$dash_c" = "x-c"; then compile_args="$compile_args $arg" @@ -214,45 +214,45 @@ for arg in $@ ; do do_link="yes" get_output_file="yes" fi - ; + ;; -E|-M|-MT) compile_args="$compile_args $arg" dash_c="-c" do_link="no" - ; + ;; -l*) libraries=" $libraries $arg " - ; + ;; -prefix=*) prefix="`expr "$arg" : '-prefix=\(.*\)'`" - ; + ;; -echo) set -x - ; + ;; -show) SHOW="echo" - ; + ;; -showconfig) showconfigure exit $status - ; + ;; -shlib) USE_SHARED_LIB="yes" - ; + ;; -noshlib) USE_SHARED_LIB="no" - ; + ;; -help) usage - ; + ;; *\"*) qarg="'"$arg"'" qargs="$qargs $qarg" - ; + ;; *\'*) qarg='"'"$arg"'"' qargs="$qargs $qarg" - ; + ;; *) if [ -s "$arg" ] ; then ext=`expr "$arg" : '.*\(\..*\)'` @@ -280,7 +280,7 @@ for arg in $@ ; do compile_args="$compile_args $arg" link_args="$link_args $arg" fi - ; + ;; esac done link_args="$link_args $qargs" @@ -312,15 +312,15 @@ if test "x$do_link" = "xyes"; then # MacOS X doesn't support the "-Wl,-rpath -Wl," style of linker flags. # It appears to want none of them specified. case "$host_os" in - darwin*) flag="" ; - *) flag="-Wl,-rpath -Wl," ; + darwin*) flag="" ;; + *) flag="-Wl,-rpath -Wl," ;; esac - ; - hpux*) flag="-Wl,+b -Wl," ; - freebsd*|solaris*) flag="-R" ; - rs6000*|aix*) flag="-L" ; - sgi) flag="-rpath " ; - *) flag="" ; + ;; + hpux*) flag="-Wl,+b -Wl," ;; + freebsd*|solaris*) flag="-R" ;; + rs6000*|aix*) flag="-L" ;; + sgi) flag="-rpath " ;; + *) flag="" ;; esac if test -n "$flag"; then @@ -334,19 +334,19 @@ if test "x$do_link" = "xyes"; then case "$lib" in -lhdf5) new_libraries="$new_libraries ${libdir}/libhdf5.a" - ; + ;; -lhdf5_hl) new_libraries="$new_libraries ${libdir}/libhdf5_hl.a" - ; + ;; -lhdf5_cpp) new_libraries="$new_libraries ${libdir}/libhdf5_cpp.a" - ; + ;; -lhdf5_hl_cpp) new_libraries="$new_libraries ${libdir}/libhdf5_hl_cpp.a" - ; + ;; *) new_libraries="$new_libraries $lib" - ; + ;; esac done libraries="$new_libraries" From 6c043887249e28a9046b4c680f483f3cc34aabd2 Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:15:32 -0500 Subject: [PATCH 6/7] undid more changes --- Modules/Core/Common/src/itkBuildInformation.cxx.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/Core/Common/src/itkBuildInformation.cxx.in b/Modules/Core/Common/src/itkBuildInformation.cxx.in index 2fed7cf4191..6e70541cd56 100644 --- a/Modules/Core/Common/src/itkBuildInformation.cxx.in +++ b/Modules/Core/Common/src/itkBuildInformation.cxx.in @@ -87,7 +87,7 @@ BuildInformation::GetValue(const MapKeyType & key) { return it->second.m_Value; } - return {}; + return {};; } const BuildInformation::MapValueDescriptionType @@ -100,7 +100,7 @@ BuildInformation::GetDescription(const MapKeyType & key) { return it->second.m_Description; } - return {}; + return {};; } const std::vector< BuildInformation::MapKeyType > From 16ac20ea8f6397a4a21e8942a931de834fabfa7d Mon Sep 17 00:00:00 2001 From: Sanjay Ananthanarayan Date: Thu, 16 Jan 2025 19:17:09 -0500 Subject: [PATCH 7/7] undid more changes --- .../HDF5/src/itkhdf5/config/cmake/libh5cc.in | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in index 06fc2365727..c950c30722e 100755 --- a/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in +++ b/Modules/ThirdParty/HDF5/src/itkhdf5/config/cmake/libh5cc.in @@ -14,8 +14,8 @@ prg=$0 if [ ! -e "$prg" ]; then case $prg in - (*/*) exit 1; - (*) prg=$(command -v -- "$prg") || exit; + (*/*) exit 1;; + (*) prg=$(command -v -- "$prg") || exit;; esac fi dir=$( @@ -64,23 +64,23 @@ for arg in $@ ; do -showconfig) showconfigure exit $status - ; + ;; -show) echo @_PKG_CONFIG_COMPILER@ $@ `pkg-config $pc_args --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@` exit $status - ; + ;; -help) usage exit $status - ; + ;; --*) # gather pkg-config specific options pc_args="$pc_args $arg" - ; + ;; *) @_PKG_CONFIG_COMPILER@ $@ `pkg-config $pc_args --define-variable=prefix=$dir --cflags --libs @_PKG_CONFIG_LIBNAME@` status=$? exit $status - ; + ;; esac done