stdlib-js / stdlib-js/stdlib

Fix C lint errors

Open
#6,169 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6k
Forks
1.3k
Avg merge
1d 3h
Merged PRs (30d)
611

Description

## C Linting Failures

Linting failures were detected in the automated lint workflow run.

### Workflow Details

- Run: https://github.com/stdlib-js/stdlib/actions/runs/13935811455
- Type: C Linting
- Date: 2025-03-19 00:14:23 UTC

### Error Details

```
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:200:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_1D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:284:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_2D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:368:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_2D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:452:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_3D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:536:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_3D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:620:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_4D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:704:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_4D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:788:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_5D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:872:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_5D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:956:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_6D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1040:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_6D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1124:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_7D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1208:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_7D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1292:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_8D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1376:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_8D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1460:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_9D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1544:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_9D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1628:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_10D_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1712:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_10D_BLOCKED_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c:1796:2: style: Variable 'x1' can be declared as pointer to const [constVariablePointer]
STDLIB_NDARRAY_NULLARY_ND_LOOP_CLBK_RET_CAST_FCN( stdlib_complex128_t, stdlib_complex128_from_complex64 )
^
```

Contributor guide

Open the contributing guide

Research direction

Start with lib/node_modules/@stdlib/ndarray/base/nullary/src/z_as_c.c and review the macro expansions reported in the C lint workflow run. Correct the constVariablePointer findings for x1, then rerun the C lint workflow or its equivalent and confirm that these errors no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.