From 0aecdd8a1f9d212630acb6dca3ed8bebefb09139 Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Sat, 4 Feb 2023 00:22:50 +0100 Subject: Removed a warning. --- include/stc/cspan.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/stc/cspan.h b/include/stc/cspan.h index bee67863..30046898 100644 --- a/include/stc/cspan.h +++ b/include/stc/cspan.h @@ -226,12 +226,12 @@ STC_INLINE intptr_t _cspan_next2(int rank, int32_t pos[], const int32_t shape[], STC_INLINE intptr_t _cspan_slice(int32_t odim[], int32_t ostri[], int* orank, const int32_t shape[], const int32_t stri[], int rank, const int32_t a[][2]) { - intptr_t off = 0, s = 1; + intptr_t off = 0; int i = 0, j = 0, ok = true; + int32_t t, s = 1; for (; i < rank; ++i) { off *= stri[i]; off += a[i][0]; - int32_t t; switch (a[i][1]) { case 0: s *= stri[i]; continue; case -1: t = shape[i]; break; -- cgit v1.2.3