From bce57e62b6f36cc80caad7bb810172b066462e66 Mon Sep 17 00:00:00 2001 From: Chris Markiewicz Date: Mon, 14 Oct 2024 13:50:21 -0400 Subject: [PATCH] Add patch for unsafe narrowing breaking OSX build --- recipes/connectome-workbench/meta.yaml | 1 + .../patches/0001-Fix-unsafe-narrowing.patch | 34 +++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch diff --git a/recipes/connectome-workbench/meta.yaml b/recipes/connectome-workbench/meta.yaml index d8177a64055e9..b1ac91817e05a 100644 --- a/recipes/connectome-workbench/meta.yaml +++ b/recipes/connectome-workbench/meta.yaml @@ -18,6 +18,7 @@ source: patches: - patches/0001-Import-cstdint-into-libCZI.h.patch - patches/0001-Allow-disabling-Desktop-or-CommandLine-builds.patch + - patches/0001-Fix-unsafe-narrowing.patch build: number: 0 diff --git a/recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch b/recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch new file mode 100644 index 0000000000000..54eb9ff3e308e --- /dev/null +++ b/recipes/connectome-workbench/patches/0001-Fix-unsafe-narrowing.patch @@ -0,0 +1,34 @@ +From cc3d4d74235978b136f637620032595cb388933b Mon Sep 17 00:00:00 2001 +From: Chris Markiewicz +Date: Mon, 14 Oct 2024 13:49:05 -0400 +Subject: [PATCH] Fix unsafe narrowing + +--- + src/Algorithms/AlgorithmCiftiSeparate.cxx | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Algorithms/AlgorithmCiftiSeparate.cxx b/src/Algorithms/AlgorithmCiftiSeparate.cxx +index 9a64a262e..f49c04e73 100644 +--- a/src/Algorithms/AlgorithmCiftiSeparate.cxx ++++ b/src/Algorithms/AlgorithmCiftiSeparate.cxx +@@ -654,7 +654,7 @@ void AlgorithmCiftiSeparate::getCroppedVolSpace(const CiftiFile* ciftiIn, const + int64_t numVoxels = (int64_t)myMap.size(); + if (numVoxels > 0) + {//make a voxel bounding box to minimize memory usage +- int extrema[6] = { myMap[0].m_ijk[0], ++ int64_t extrema[6] = { myMap[0].m_ijk[0], + myMap[0].m_ijk[0], + myMap[0].m_ijk[1], + myMap[0].m_ijk[1], +@@ -699,7 +699,7 @@ void AlgorithmCiftiSeparate::getCroppedVolSpaceAll(const CiftiFile* ciftiIn, con + int64_t numVoxels = (int64_t)myMap.size(); + if (numVoxels > 0) + {//make a voxel bounding box to minimize memory usage +- int extrema[6] = { myMap[0].m_ijk[0], ++ int64_t extrema[6] = { myMap[0].m_ijk[0], + myMap[0].m_ijk[0], + myMap[0].m_ijk[1], + myMap[0].m_ijk[1], +-- +2.45.2 +