Skip to content

Commit

Permalink
Add patch for unsafe narrowing breaking OSX build
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 14, 2024
1 parent 30d9af5 commit bce57e6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions recipes/connectome-workbench/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From cc3d4d74235978b136f637620032595cb388933b Mon Sep 17 00:00:00 2001
From: Chris Markiewicz <[email protected]>
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

0 comments on commit bce57e6

Please sign in to comment.