Skip to content

Commit 0063119

Browse files
committed
chore: fix C lint errors (issue #7973)
1 parent 2ff3d13 commit 0063119

File tree

1 file changed

+32
-32
lines changed
  • lib/node_modules/@stdlib/ndarray/base/ind2sub/benchmark/c

1 file changed

+32
-32
lines changed

lib/node_modules/@stdlib/ndarray/base/ind2sub/benchmark/c/benchmark.c

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ static double benchmark1( void ) {
100100
int i;
101101

102102
int64_t ndims = 3;
103-
int64_t shape[] = { 10, 10, 10 };
104-
int64_t strides[] = { 100, -10, 1 };
103+
const int64_t shape[] = { 10, 10, 10 };
104+
const int64_t strides[] = { 100, -10, 1 };
105105
int64_t offset = 90;
106106
int64_t len = 1000;
107107

@@ -136,8 +136,8 @@ static double benchmark2( void ) {
136136
int i;
137137

138138
int64_t ndims = 3;
139-
int64_t shape[] = { 10, 10, 10 };
140-
int64_t strides[] = { 1, -10, 100 };
139+
const int64_t shape[] = { 10, 10, 10 };
140+
const int64_t strides[] = { 1, -10, 100 };
141141
int64_t offset = 90;
142142
int64_t len = 1000;
143143

@@ -172,8 +172,8 @@ static double benchmark3( void ) {
172172
int i;
173173

174174
int64_t ndims = 3;
175-
int64_t shape[] = { 10, 10, 10 };
176-
int64_t strides[] = { 100, 10, 1 };
175+
const int64_t shape[] = { 10, 10, 10 };
176+
const int64_t strides[] = { 100, 10, 1 };
177177
int64_t offset = 0;
178178
int64_t len = 1000;
179179

@@ -208,8 +208,8 @@ static double benchmark4( void ) {
208208
int i;
209209

210210
int64_t ndims = 3;
211-
int64_t shape[] = { 10, 10, 10 };
212-
int64_t strides[] = { 1, 10, 100 };
211+
const int64_t shape[] = { 10, 10, 10 };
212+
const int64_t strides[] = { 1, 10, 100 };
213213
int64_t offset = 0;
214214
int64_t len = 1000;
215215

@@ -244,8 +244,8 @@ static double benchmark5( void ) {
244244
int i;
245245

246246
int64_t ndims = 3;
247-
int64_t shape[] = { 10, 10, 10 };
248-
int64_t strides[] = { 100, -10, 1 };
247+
const int64_t shape[] = { 10, 10, 10 };
248+
const int64_t strides[] = { 100, -10, 1 };
249249
int64_t offset = 90;
250250
int64_t len = 1000;
251251

@@ -280,8 +280,8 @@ static double benchmark6( void ) {
280280
int i;
281281

282282
int64_t ndims = 3;
283-
int64_t shape[] = { 10, 10, 10 };
284-
int64_t strides[] = { 1, -10, 100 };
283+
const int64_t shape[] = { 10, 10, 10 };
284+
const int64_t strides[] = { 1, -10, 100 };
285285
int64_t offset = 90;
286286
int64_t len = 1000;
287287

@@ -316,8 +316,8 @@ static double benchmark7( void ) {
316316
int i;
317317

318318
int64_t ndims = 3;
319-
int64_t shape[] = { 10, 10, 10 };
320-
int64_t strides[] = { 100, 10, 1 };
319+
const int64_t shape[] = { 10, 10, 10 };
320+
const int64_t strides[] = { 100, 10, 1 };
321321
int64_t offset = 0;
322322
int64_t len = 1000;
323323

@@ -352,8 +352,8 @@ static double benchmark8( void ) {
352352
int i;
353353

354354
int64_t ndims = 3;
355-
int64_t shape[] = { 10, 10, 10 };
356-
int64_t strides[] = { 1, 10, 100 };
355+
const int64_t shape[] = { 10, 10, 10 };
356+
const int64_t strides[] = { 1, 10, 100 };
357357
int64_t offset = 0;
358358
int64_t len = 1000;
359359

@@ -388,8 +388,8 @@ static double benchmark9( void ) {
388388
int i;
389389

390390
int64_t ndims = 3;
391-
int64_t shape[] = { 10, 10, 10 };
392-
int64_t strides[] = { 100, -10, 1 };
391+
const int64_t shape[] = { 10, 10, 10 };
392+
const int64_t strides[] = { 100, -10, 1 };
393393
int64_t offset = 90;
394394
int64_t len = 1000;
395395

@@ -424,8 +424,8 @@ static double benchmark10( void ) {
424424
int i;
425425

426426
int64_t ndims = 3;
427-
int64_t shape[] = { 10, 10, 10 };
428-
int64_t strides[] = { 1, -10, 100 };
427+
const int64_t shape[] = { 10, 10, 10 };
428+
const int64_t strides[] = { 1, -10, 100 };
429429
int64_t offset = 90;
430430
int64_t len = 1000;
431431

@@ -460,8 +460,8 @@ static double benchmark11( void ) {
460460
int i;
461461

462462
int64_t ndims = 3;
463-
int64_t shape[] = { 10, 10, 10 };
464-
int64_t strides[] = { 100, 10, 1 };
463+
const int64_t shape[] = { 10, 10, 10 };
464+
const int64_t strides[] = { 100, 10, 1 };
465465
int64_t offset = 0;
466466
int64_t len = 1000;
467467

@@ -496,8 +496,8 @@ static double benchmark12( void ) {
496496
int i;
497497

498498
int64_t ndims = 3;
499-
int64_t shape[] = { 10, 10, 10 };
500-
int64_t strides[] = { 1, 10, 100 };
499+
const int64_t shape[] = { 10, 10, 10 };
500+
const int64_t strides[] = { 1, 10, 100 };
501501
int64_t offset = 0;
502502
int64_t len = 1000;
503503

@@ -532,8 +532,8 @@ static double benchmark13( void ) {
532532
int i;
533533

534534
int64_t ndims = 3;
535-
int64_t shape[] = { 10, 10, 10 };
536-
int64_t strides[] = { 100, -10, 1 };
535+
const int64_t shape[] = { 10, 10, 10 };
536+
const int64_t strides[] = { 100, -10, 1 };
537537
int64_t offset = 90;
538538
int64_t len = 1000;
539539

@@ -568,8 +568,8 @@ static double benchmark14( void ) {
568568
int i;
569569

570570
int64_t ndims = 3;
571-
int64_t shape[] = { 10, 10, 10 };
572-
int64_t strides[] = { 1, -10, 100 };
571+
const int64_t shape[] = { 10, 10, 10 };
572+
const int64_t strides[] = { 1, -10, 100 };
573573
int64_t offset = 90;
574574
int64_t len = 1000;
575575

@@ -604,8 +604,8 @@ static double benchmark15( void ) {
604604
int i;
605605

606606
int64_t ndims = 3;
607-
int64_t shape[] = { 10, 10, 10 };
608-
int64_t strides[] = { 100, 10, 1 };
607+
const int64_t shape[] = { 10, 10, 10 };
608+
const int64_t strides[] = { 100, 10, 1 };
609609
int64_t offset = 0;
610610
int64_t len = 1000;
611611

@@ -640,8 +640,8 @@ static double benchmark16( void ) {
640640
int i;
641641

642642
int64_t ndims = 3;
643-
int64_t shape[] = { 10, 10, 10 };
644-
int64_t strides[] = { 1, 10, 100 };
643+
const int64_t shape[] = { 10, 10, 10 };
644+
const int64_t strides[] = { 1, 10, 100 };
645645
int64_t offset = 0;
646646
int64_t len = 1000;
647647

0 commit comments

Comments
 (0)