summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-04 00:22:50 +0100
committerTyge Løvset <[email protected]>2023-02-04 00:22:50 +0100
commit0aecdd8a1f9d212630acb6dca3ed8bebefb09139 (patch)
treee7fe2e4388a7bcffce05fbf840172d2dfb21004c
parent51961138b16fbebacd76ce465fb979830d0f9701 (diff)
downloadSTC-modified-0aecdd8a1f9d212630acb6dca3ed8bebefb09139.tar.gz
STC-modified-0aecdd8a1f9d212630acb6dca3ed8bebefb09139.zip
Removed a warning.
-rw-r--r--include/stc/cspan.h4
1 files 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;