Skip to content

Fix W560 "possible truncation at implicit conversion to type unsigned char" warnings raised by Tasking compiler.#10282

Merged
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
kareem-wolfssl:zd21527
Apr 24, 2026
Merged

Fix W560 "possible truncation at implicit conversion to type unsigned char" warnings raised by Tasking compiler.#10282
JacobBarthelmeh merged 2 commits intowolfSSL:masterfrom
kareem-wolfssl:zd21527

Conversation

@kareem-wolfssl
Copy link
Copy Markdown
Contributor

Description

Fixes zd#21527

Testing

Built in tests, customer confirmed fix

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

@kareem-wolfssl kareem-wolfssl self-assigned this Apr 22, 2026
Copilot AI review requested due to automatic review settings April 22, 2026 22:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses Tasking compiler W560 warnings by making narrowing conversions explicit and by guarding an LwIP send length conversion to a 16-bit type.

Changes:

  • Add explicit (byte) casts when storing word32/carry values into byte buffers in low-memory field element operations.
  • Add explicit cast for TLS 1.3 GetNewSAHashAlgo() result when assigning into a byte.
  • Add range-check and explicit (u16_t) cast before passing sz into lwIP’s tcp_write().

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
wolfcrypt/src/fe_low_mem.c Makes byte truncations explicit in Curve25519/Ed25519 small/low-mem math helpers.
src/wolfio.c Adds size validation and explicit 16-bit cast for LwIP native send path.
src/tls13.c Makes enum-to-byte narrowing conversion explicit when decoding TLS 1.3 signature algorithms.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/wolfio.c Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

MemBrowse Memory Report

No memory changes detected for:

@JacobBarthelmeh JacobBarthelmeh merged commit a20c391 into wolfSSL:master Apr 24, 2026
448 checks passed
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