From a12e825ee684d6a61cf18ef30c056fc9f424b7b5 Mon Sep 17 00:00:00 2001 From: Martin Uecker Date: Wed, 19 Jun 2024 12:36:28 +0200 Subject: [PATCH] make count an integer --- src/bitmask.c | 2 +- src/casorati.c | 2 +- src/copy.c | 2 +- src/extract.c | 2 +- src/join.c | 4 ++-- src/misc/opts.h | 2 +- src/multicfl.c | 2 +- src/ones.c | 2 +- src/poly.c | 2 +- src/reshape.c | 2 +- src/resize.c | 2 +- src/slice.c | 2 +- src/tensorflow.c | 2 +- src/vec.c | 2 +- src/wavelet.c | 2 +- src/zeros.c | 2 +- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/bitmask.c b/src/bitmask.c index a55c1d980..a3ac04ca1 100644 --- a/src/bitmask.c +++ b/src/bitmask.c @@ -23,7 +23,7 @@ static const char help_str[] = "Convert between a bitmask and set of dimensions. int main_bitmask(int argc, char* argv[argc]) { - long count = 0; + int count = 0; unsigned long* dims = NULL; struct arg_s args[] = { diff --git a/src/casorati.c b/src/casorati.c index 772c999bd..23da8bfb5 100644 --- a/src/casorati.c +++ b/src/casorati.c @@ -32,7 +32,7 @@ static const char help_str[] = "Casorati matrix with kernel (kern1, ..., kernN) int main_casorati(int argc, char* argv[argc]) { - long count = 0; + int count = 0; unsigned int* dims = NULL; unsigned int* kerns = NULL; const char* in_file = NULL; diff --git a/src/copy.c b/src/copy.c index 8060633b4..7432788d7 100644 --- a/src/copy.c +++ b/src/copy.c @@ -32,7 +32,7 @@ static const char help_str[] = "Copy an array (to a given position in the output int main_copy(int argc, char* argv[argc]) { - long count = 0; + int count = 0; long* dims = NULL; long* poss = NULL; const char* in_file = NULL; diff --git a/src/extract.c b/src/extract.c index 54de7ac41..c24e9b065 100644 --- a/src/extract.c +++ b/src/extract.c @@ -33,7 +33,7 @@ static const char help_str[] = "Extracts a sub-array along dims from index start int main_extract(int argc, char* argv[argc]) { - long count = 0; + int count = 0; long* dims = NULL; long* starts = NULL; long* ends = NULL; diff --git a/src/join.c b/src/join.c index b4d8a4b4a..e2657c150 100644 --- a/src/join.c +++ b/src/join.c @@ -40,7 +40,7 @@ static const char help_str[] = int main_join(int argc, char* argv[argc]) { - long count = 0; + int count = 0; int dim = -1; const char** in_files = NULL; const char* out_file = NULL; @@ -74,7 +74,7 @@ int main_join(int argc, char* argv[argc]) assert(count > 1); - int len = strlen(out_file); + int len = (int)strlen(out_file); char buf[len + 5]; strcpy(buf, out_file); strcat(buf, ".cfl"); diff --git a/src/misc/opts.h b/src/misc/opts.h index 0d4c3e8d2..211aad0f4 100644 --- a/src/misc/opts.h +++ b/src/misc/opts.h @@ -151,7 +151,7 @@ struct arg_s { bool required; enum ARG_TYPE arg_type; - long* count; + int* count; int nargs; struct arg_single_s* arg; }; diff --git a/src/multicfl.c b/src/multicfl.c index 30c27e937..4e6d8e273 100644 --- a/src/multicfl.c +++ b/src/multicfl.c @@ -33,7 +33,7 @@ int main_multicfl(int argc, char* argv[argc]) OPT_SET('s', &separate, "separate"), }; - long count = 0; + int count = 0; const char** cfl_files = NULL; struct arg_s args[] = { diff --git a/src/ones.c b/src/ones.c index bc05d68af..bd4b528f5 100644 --- a/src/ones.c +++ b/src/ones.c @@ -28,7 +28,7 @@ static const char help_str[] = "Create an array filled with ones with {dims} dim int main_ones(int argc, char* argv[argc]) { - long count = 0; + int count = 0; long N = -1; long* dims = NULL; diff --git a/src/poly.c b/src/poly.c index 01dd138a1..2b4aa4844 100644 --- a/src/poly.c +++ b/src/poly.c @@ -31,7 +31,7 @@ int main_poly(int argc, char* argv[argc]) { int L = -1; int N = -1; - long count = 0; + int count = 0; float* as = NULL; const char* out_file = NULL; diff --git a/src/reshape.c b/src/reshape.c index e0a4b2073..45d778525 100644 --- a/src/reshape.c +++ b/src/reshape.c @@ -29,7 +29,7 @@ static const char help_str[] = "Reshape selected dimensions."; int main_reshape(int argc, char* argv[argc]) { unsigned long flags = 0; - long count = 0; + int count = 0; long* dims = NULL; const char* in_file = NULL; const char* out_file = NULL; diff --git a/src/resize.c b/src/resize.c index e93269eaf..0d91ce279 100644 --- a/src/resize.c +++ b/src/resize.c @@ -33,7 +33,7 @@ static const char help_str[] = "Resizes an array along dimensions to sizes by tr int main_resize(int argc, char* argv[argc]) { - long count = 0; + int count = 0; unsigned int* dims = NULL; unsigned int* sizes = NULL; diff --git a/src/slice.c b/src/slice.c index 0df70c3b7..920926bd8 100644 --- a/src/slice.c +++ b/src/slice.c @@ -36,7 +36,7 @@ static const char help_str[] = "Extracts a slice from positions along dimensions int main_slice(int argc, char* argv[argc]) { - long count = 0; + int count = 0; long* dims = NULL; long* poss = NULL; diff --git a/src/tensorflow.c b/src/tensorflow.c index 1679c399e..43158c76d 100644 --- a/src/tensorflow.c +++ b/src/tensorflow.c @@ -41,7 +41,7 @@ static const char help_str[] = int main_tensorflow(int argc, char* argv[argc]) { - long count = 0; + int count = 0; const char* graph = NULL; const char* key = NULL; diff --git a/src/vec.c b/src/vec.c index 6022aa392..2087f753f 100644 --- a/src/vec.c +++ b/src/vec.c @@ -27,7 +27,7 @@ static const char help_str[] = "Create a vector of values."; int main_vec(int argc, char* argv[argc]) { - long count = 0; + int count = 0; complex float* vals = NULL; const char* out_file = NULL; diff --git a/src/wavelet.c b/src/wavelet.c index 78b9d97e7..cb3184079 100644 --- a/src/wavelet.c +++ b/src/wavelet.c @@ -37,7 +37,7 @@ static const char help_str[] = "Perform wavelet transform."; int main_wavelet(int argc, char* argv[argc]) { unsigned long flags = 0; - long count = 0; + int count = 0; long* adims = NULL; const char* in_file = NULL; const char* out_file = NULL; diff --git a/src/zeros.c b/src/zeros.c index 0ab70b4f9..9581a1357 100644 --- a/src/zeros.c +++ b/src/zeros.c @@ -27,7 +27,7 @@ static const char help_str[] = "Create a zero-filled array with {dims} dimension int main_zeros(int argc, char* argv[argc]) { - long count = 0; + int count = 0; long N = -1; long* dims = NULL;