Skip to content

chore: fix C lint errors (issue #13733) - #13741

Open
A-S-Manoj wants to merge 4 commits into
stdlib-js:developfrom
A-S-Manoj:fix-c-lint-13733
Open

chore: fix C lint errors (issue #13733)#13741
A-S-Manoj wants to merge 4 commits into
stdlib-js:developfrom
A-S-Manoj:fix-c-lint-13733

Conversation

@A-S-Manoj

Copy link
Copy Markdown
Contributor

Resolves #13733.

Description

What is the purpose of this pull request?

This pull request:

  • Fixes a C lint error in lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c by declaring the input array X as const, since it is only read from (passed as const float *X to stdlib_strided_smap) and never modified.

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

Verified locally with cppcheck --enable=style: the warning is present before the change and gone after. Also confirmed the change compiles cleanly with gcc -Wall -Wextra and matches the existing convention used in sibling examples (e.g. dmap's example already declares its input array const).

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

@stdlib-js/reviewers

Signed-off-by: A Sivasubramanian Manoj <ph0en1x.1ncog@gmail.com>
@A-S-Manoj
A-S-Manoj requested a review from a team July 29, 2026 05:01
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jul 29, 2026
@stdlib-bot

stdlib-bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
strided/base/smap $\\color{green}206/206$
$\\color{green}+0.00\\%$
$\\color{green}9/9$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}206/206$
$\\color{green}+0.00\\%$

The above coverage report was generated for the changes in this PR.

Comment thread lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c Outdated
Comment thread lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/strided/base/smap/examples/c/example.c Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@A-S-Manoj Would you mind propagating these changes to the README, as well? Cheers!

@kgryte kgryte added difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. C Issue involves or relates to C. Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C Issue involves or relates to C. difficulty: 1 Low degree of difficulty. Should be straightforward to implement and/or resolve. Needs Changes Pull request which needs changes before being merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix C lint errors

3 participants