[med-svn] [Git][med-team/bart][master] add fix for 32 bit warnings / issues
Martin Uecker (@uecker-guest)
gitlab at salsa.debian.org
Sat Jun 6 14:51:04 BST 2026
Martin Uecker pushed to branch master at Debian Med / bart
Commits:
4ceb7fb8 by Martin Uecker at 2026-06-06T15:50:28+02:00
add fix for 32 bit warnings / issues
- - - - -
2 changed files:
- + debian/patches/0009-32-bit-issues.patch
- debian/patches/series
Changes:
=====================================
debian/patches/0009-32-bit-issues.patch
=====================================
@@ -0,0 +1,135 @@
+From: Martin Uecker <uecker at tugraz.at>
+Date: Fri, 5 Jun 2026 11:35:17 +0200
+Subject: 32 bit issues
+
+---
+ src/misc/stream_protocol.c | 6 +++---
+ src/noncart/nufft.c | 3 ++-
+ src/num/delayed.c | 2 ++
+ src/num/mem.c | 3 ++-
+ src/num/vptr.c | 4 ++--
+ src/twixread.c | 3 +--
+ 6 files changed, 12 insertions(+), 9 deletions(-)
+
+diff --git a/src/misc/stream_protocol.c b/src/misc/stream_protocol.c
+index 2b2fb32..ca05838 100644
+--- a/src/misc/stream_protocol.c
++++ b/src/misc/stream_protocol.c
+@@ -20,7 +20,7 @@ enum stream_param { NO_PARAMS = 0, LONG_PARAM };
+ struct typeinfo {
+
+ const char* keyword;
+- unsigned int keylen;
++ ssize_t keylen;
+ bool ext;
+ enum stream_param param;
+ };
+@@ -28,7 +28,7 @@ struct typeinfo {
+ #define TOKEN "\n# "
+ const int token_len = strlen(TOKEN);
+ #define KW_PADDED(x) x "\n"
+-#define KW(x) .keyword = KW_PADDED(x), .keylen = (unsigned int)strlen(KW_PADDED(x))
++#define KW(x) .keyword = KW_PADDED(x), .keylen = (ssize_t)strlen(KW_PADDED(x))
+
+ // Max keyword len: MSG_HDR_SIZE - 1 - token_len
+ static const struct typeinfo types[] = {
+@@ -79,7 +79,7 @@ bool stream_decode(struct stream_msg* msg, int l, const char buf[l])
+ memcpy(str, buf + token_len, MSG_HDR_SIZE - token_len - 1);
+
+ for (msg->type = ARRAY_SIZE(types) - 1; msg->type > STREAM_MSG_INVALID; msg->type--)
+- if (0 == strncmp(types[msg->type].keyword, str, types[msg->type].keylen))
++ if (0 == strncmp(types[msg->type].keyword, str, (size_t)types[msg->type].keylen))
+ break;
+
+ if (STREAM_MSG_INVALID == msg->type)
+diff --git a/src/noncart/nufft.c b/src/noncart/nufft.c
+index aec8382..a0736be 100644
+--- a/src/noncart/nufft.c
++++ b/src/noncart/nufft.c
+@@ -200,7 +200,8 @@ static complex float* compute_linphases(int N, long lph_dims[N + 1], unsigned lo
+ float shifts[1 << T][T];
+
+ int s = 0;
+- for (unsigned long i = 0; i < (1ul << T); i++) {
++
++ for (unsigned long i = 0; i < (1UL << T); i++) {
+
+ bool skip = false;
+
+diff --git a/src/num/delayed.c b/src/num/delayed.c
+index 2fdd2aa..2985d44 100644
+--- a/src/num/delayed.c
++++ b/src/num/delayed.c
+@@ -336,6 +336,7 @@ void debug_delayed_queue(int dl, list_t ops_queue, bool nested)
+
+ queue->compute = false;
+ bart_unlock(queue->lock);
++
+ } else {
+
+ delayed_nested_level++;
+@@ -578,6 +579,7 @@ static struct delayed_op_arg_s arg_create(int N, const long dims[N], const long
+ tsize += (tdims[i] - 1) * tstrs[i];
+
+ assert(tsize <= md_calc_size(arg.N, arg.mdims) * (long)arg.msize);
++
+ if (tsize == md_calc_size(arg.N, arg.mdims) * (long)arg.msize)
+ arg.full_access = true;
+
+diff --git a/src/num/mem.c b/src/num/mem.c
+index 781db24..f67bbf4 100644
+--- a/src/num/mem.c
++++ b/src/num/mem.c
+@@ -233,7 +233,8 @@ void memcache_clear(void (*device_free)(const void* x, bool host))
+
+ while (NULL != nptr) {
+
+- debug_printf(DP_DEBUG3, "Freeing %ld bytes.\n", nptr->len);
++ debug_printf(DP_DEBUG3, "Freeing %zd bytes.\n", nptr->len);
++
+ if (!nptr->host)
+ freed += nptr->len;
+
+diff --git a/src/num/vptr.c b/src/num/vptr.c
+index 90bedcd..0776ad5 100644
+--- a/src/num/vptr.c
++++ b/src/num/vptr.c
+@@ -415,7 +415,7 @@ static void vptr_debug_mem(int dl, const struct mem_s* mem)
+
+ if (0 < mem->shape.N) {
+
+- debug_printf(dl, "size: %lu, dims: ", mem->shape.size);
++ debug_printf(dl, "size: %zu, dims: ", mem->shape.size);
+ debug_print_dims(dl, mem->shape.N, mem->shape.dims);
+ }
+
+@@ -425,7 +425,7 @@ static void vptr_debug_mem(int dl, const struct mem_s* mem)
+
+ for (int i = 0; i < mem->range.D; i++) {
+
+- debug_printf(dl, "%d: %p size: %lu, dims: ", i, mem->range.sub_ptr[i]->ptr, mem->range.sub_ptr[i]->shape.size);
++ debug_printf(dl, "%d: %p size: %zu, dims: ", i, mem->range.sub_ptr[i]->ptr, mem->range.sub_ptr[i]->shape.size);
+ debug_print_dims(dl, mem->range.sub_ptr[i]->shape.N, mem->range.sub_ptr[i]->shape.dims);
+ }
+ }
+diff --git a/src/twixread.c b/src/twixread.c
+index 9d9cf70..23c78eb 100644
+--- a/src/twixread.c
++++ b/src/twixread.c
+@@ -188,7 +188,6 @@ enum adc_flags {
+ WIP_1,
+ WIP_2,
+ WIP_3,
+-
+ };
+
+
+@@ -268,7 +267,7 @@ static bool is_image_adc(uint64_t adc_flag)
+ uint64_t non_image = MD_BIT(ACQEND) | MD_BIT(SYNCDATA) |
+ MD_BIT(RTFEEDBACK) | MD_BIT(HPFEEDBACK) | MD_BIT(REFPHASESTABSCAN) |
+ MD_BIT(PHASESTABSCAN) | MD_BIT(PHASCOR) | MD_BIT(NOISEADJSCAN) |
+- MD_BIT(unused60);
++ MD_BIT(RETRO_DUMMYSCAN) | (1ULL < unused60);
+
+ if (adc_flag & non_image)
+ return false;
=====================================
debian/patches/series
=====================================
@@ -6,3 +6,4 @@
0006-remove-exec-command-mechanism.patch
0007-fix-initialization-for-direct-call-of-tools.patch
0008-do-not-delete-command.txt.patch
+0009-32-bit-issues.patch
View it on GitLab: https://salsa.debian.org/med-team/bart/-/commit/4ceb7fb836933e454bb6ce48bddbdf25edb78971
--
View it on GitLab: https://salsa.debian.org/med-team/bart/-/commit/4ceb7fb836933e454bb6ce48bddbdf25edb78971
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260606/09240eee/attachment-0001.htm>
More information about the debian-med-commit
mailing list