Skip to content

Fix the cppcheck 2.13 findings - #1357

Open
ejohnstown wants to merge 2 commits into
wolfSSL:masterfrom
ejohnstown:cppcheck-cleanup
Open

ejohnstown wants to merge 2 commits into
wolfSSL:masterfrom
ejohnstown:cppcheck-cleanup

Conversation

@ejohnstown

@ejohnstown ejohnstown commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Clears the four warnings cppcheck 2.13 reports on master.

  • wolfsshd.c, internal.c: restructure two checks that were redundant in one build configuration
  • wolfsftp.c: suppress a constStatement that only appears in cppcheck's invented -DWWRITE configuration
  • cppcheck.yml: run the step under bash so pipefail fails the job on a finding, and upload the results file only on failure

Restructure the two sites that left a redundant check in one build
configuration, and suppress a warning that only appears in a
configuration cppcheck invents.

- wolfsshd.c: set the -h host key file in the else of the cert store
  conflict check instead of retesting ret.
- internal.c CompositeEccSign: run wc_ecc_sig_to_rs from an else shared
  by the small-stack allocation check and the plain stack arrays.
- wolfsftp.c: suppress constStatement on WWRITE; cppcheck's -DWWRITE
  configuration turns the arguments into a comma expression.
Copilot AI balanced review requested due to automatic review settings October 30, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #1357

Scan targets checked: wolfssh-src, wolfssh-bugs
Coverage: 3 of 3 in-scope changed file(s) opened by the reviewer

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

The cppcheck step pipes through tee, so its exit code was lost and the
job passed with findings. Run the step under bash, which sets pipefail,
and upload the results file only when the step fails.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants