Skip to content

Commit 07c6072

Browse files
committed
chore: fix C lint errors #8308
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: missing_dependencies - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent be6826b commit 07c6072

File tree

1 file changed

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

1 file changed

+32
-32
lines changed

lib/node_modules/@stdlib/ndarray/base/bind2vind/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

@@ -134,8 +134,8 @@ static double benchmark2( void ) {
134134
int i;
135135

136136
int64_t ndims = 3;
137-
int64_t shape[] = { 10, 10, 10 };
138-
int64_t strides[] = { 1, -10, 100 };
137+
const int64_t shape[] = { 10, 10, 10 };
138+
const int64_t strides[] = { 1, -10, 100 };
139139
int64_t offset = 90;
140140
int64_t len = 1000;
141141

@@ -168,8 +168,8 @@ static double benchmark3( void ) {
168168
int i;
169169

170170
int64_t ndims = 3;
171-
int64_t shape[] = { 10, 10, 10 };
172-
int64_t strides[] = { 100, 10, 1 };
171+
const int64_t shape[] = { 10, 10, 10 };
172+
const int64_t strides[] = { 100, 10, 1 };
173173
int64_t offset = 0;
174174
int64_t len = 1000;
175175

@@ -202,8 +202,8 @@ static double benchmark4( void ) {
202202
int i;
203203

204204
int64_t ndims = 3;
205-
int64_t shape[] = { 10, 10, 10 };
206-
int64_t strides[] = { 1, 10, 100 };
205+
const int64_t shape[] = { 10, 10, 10 };
206+
const int64_t strides[] = { 1, 10, 100 };
207207
int64_t offset = 0;
208208
int64_t len = 1000;
209209

@@ -236,8 +236,8 @@ static double benchmark5( void ) {
236236
int i;
237237

238238
int64_t ndims = 3;
239-
int64_t shape[] = { 10, 10, 10 };
240-
int64_t strides[] = { 100, -10, 1 };
239+
const int64_t shape[] = { 10, 10, 10 };
240+
const int64_t strides[] = { 100, -10, 1 };
241241
int64_t offset = 90;
242242
int64_t len = 1000;
243243

@@ -270,8 +270,8 @@ static double benchmark6( void ) {
270270
int i;
271271

272272
int64_t ndims = 3;
273-
int64_t shape[] = { 10, 10, 10 };
274-
int64_t strides[] = { 1, -10, 100 };
273+
const int64_t shape[] = { 10, 10, 10 };
274+
const int64_t strides[] = { 1, -10, 100 };
275275
int64_t offset = 90;
276276
int64_t len = 1000;
277277

@@ -304,8 +304,8 @@ static double benchmark7( void ) {
304304
int i;
305305

306306
int64_t ndims = 3;
307-
int64_t shape[] = { 10, 10, 10 };
308-
int64_t strides[] = { 100, 10, 1 };
307+
const int64_t shape[] = { 10, 10, 10 };
308+
const int64_t strides[] = { 100, 10, 1 };
309309
int64_t offset = 0;
310310
int64_t len = 1000;
311311

@@ -338,8 +338,8 @@ static double benchmark8( void ) {
338338
int i;
339339

340340
int64_t ndims = 3;
341-
int64_t shape[] = { 10, 10, 10 };
342-
int64_t strides[] = { 1, 10, 100 };
341+
const int64_t shape[] = { 10, 10, 10 };
342+
const int64_t strides[] = { 1, 10, 100 };
343343
int64_t offset = 0;
344344
int64_t len = 1000;
345345

@@ -372,8 +372,8 @@ static double benchmark9( void ) {
372372
int i;
373373

374374
int64_t ndims = 3;
375-
int64_t shape[] = { 10, 10, 10 };
376-
int64_t strides[] = { 100, -10, 1 };
375+
const int64_t shape[] = { 10, 10, 10 };
376+
const int64_t strides[] = { 100, -10, 1 };
377377
int64_t offset = 90;
378378
int64_t len = 1000;
379379

@@ -406,8 +406,8 @@ static double benchmark10( void ) {
406406
int i;
407407

408408
int64_t ndims = 3;
409-
int64_t shape[] = { 10, 10, 10 };
410-
int64_t strides[] = { 1, -10, 100 };
409+
const int64_t shape[] = { 10, 10, 10 };
410+
const int64_t strides[] = { 1, -10, 100 };
411411
int64_t offset = 90;
412412
int64_t len = 1000;
413413

@@ -440,8 +440,8 @@ static double benchmark11( void ) {
440440
int i;
441441

442442
int64_t ndims = 3;
443-
int64_t shape[] = { 10, 10, 10 };
444-
int64_t strides[] = { 100, 10, 1 };
443+
const int64_t shape[] = { 10, 10, 10 };
444+
const int64_t strides[] = { 100, 10, 1 };
445445
int64_t offset = 0;
446446
int64_t len = 1000;
447447

@@ -474,8 +474,8 @@ static double benchmark12( void ) {
474474
int i;
475475

476476
int64_t ndims = 3;
477-
int64_t shape[] = { 10, 10, 10 };
478-
int64_t strides[] = { 1, 10, 100 };
477+
const int64_t shape[] = { 10, 10, 10 };
478+
const int64_t strides[] = { 1, 10, 100 };
479479
int64_t offset = 0;
480480
int64_t len = 1000;
481481

@@ -508,8 +508,8 @@ static double benchmark13( void ) {
508508
int i;
509509

510510
int64_t ndims = 3;
511-
int64_t shape[] = { 10, 10, 10 };
512-
int64_t strides[] = { 100, -10, 1 };
511+
const int64_t shape[] = { 10, 10, 10 };
512+
const int64_t strides[] = { 100, -10, 1 };
513513
int64_t offset = 90;
514514
int64_t len = 1000;
515515

@@ -542,8 +542,8 @@ static double benchmark14( void ) {
542542
int i;
543543

544544
int64_t ndims = 3;
545-
int64_t shape[] = { 10, 10, 10 };
546-
int64_t strides[] = { 1, -10, 100 };
545+
const int64_t shape[] = { 10, 10, 10 };
546+
const int64_t strides[] = { 1, -10, 100 };
547547
int64_t offset = 90;
548548
int64_t len = 1000;
549549

@@ -576,8 +576,8 @@ static double benchmark15( void ) {
576576
int i;
577577

578578
int64_t ndims = 3;
579-
int64_t shape[] = { 10, 10, 10 };
580-
int64_t strides[] = { 100, 10, 1 };
579+
const int64_t shape[] = { 10, 10, 10 };
580+
const int64_t strides[] = { 100, 10, 1 };
581581
int64_t offset = 0;
582582
int64_t len = 1000;
583583

@@ -610,8 +610,8 @@ static double benchmark16( void ) {
610610
int i;
611611

612612
int64_t ndims = 3;
613-
int64_t shape[] = { 10, 10, 10 };
614-
int64_t strides[] = { 1, 10, 100 };
613+
const int64_t shape[] = { 10, 10, 10 };
614+
const int64_t strides[] = { 1, 10, 100 };
615615
int64_t offset = 0;
616616
int64_t len = 1000;
617617

0 commit comments

Comments
 (0)