From 1af348ec8fc139aaaa2682934595564dd5999975 Mon Sep 17 00:00:00 2001 From: GeoDaoyu Date: Thu, 27 Nov 2025 10:53:07 +0800 Subject: [PATCH 1/2] chore: fix C lint errors (issue #8608) --- .../base/max-view-buffer-index/benchmark/c/benchmark.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c index 04ac010e577a..f2ec9b3a3f8d 100644 --- a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c @@ -96,10 +96,10 @@ static double benchmark( void ) { double t; int i; - int64_t shape[] = { 10, 10, 10 }; - int64_t strides[] = { 100, 10, 1 }; - int64_t offset = 1000; - int64_t ndims = 3; + const int64_t shape[] = { 10, 10, 10 }; + const int64_t strides[] = { 100, 10, 1 }; + const int64_t offset = 1000; + const int64_t ndims = 3; t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { From 908206586521474188187e17534c93952b800f92 Mon Sep 17 00:00:00 2001 From: Athan Date: Wed, 26 Nov 2025 23:46:10 -0800 Subject: [PATCH 2/2] bench: fix compilation failure Signed-off-by: Athan --- .../base/max-view-buffer-index/benchmark/c/benchmark.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c index f2ec9b3a3f8d..2d95d20e97f4 100644 --- a/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c +++ b/lib/node_modules/@stdlib/ndarray/base/max-view-buffer-index/benchmark/c/benchmark.c @@ -97,13 +97,13 @@ static double benchmark( void ) { int i; const int64_t shape[] = { 10, 10, 10 }; - const int64_t strides[] = { 100, 10, 1 }; + int64_t strides[] = { 100, 10, 1 }; const int64_t offset = 1000; const int64_t ndims = 3; t = tic(); for ( i = 0; i < ITERATIONS; i++ ) { - strides[ 0 ] *= ( rand_double() < 0.5 ) ? 1 : -1; + strides[ 0 ] *= ( i%2 == 1 ) ? 1 : -1; n = stdlib_ndarray_max_view_buffer_index( ndims, shape, strides, offset ); if ( n > 1e10 ) { printf( "unexpected result\n" );