Skip to content

Fix GCC warnings#9292

Merged
douzzer merged 8 commits intowolfSSL:masterfrom
embhorn:zd20626
Oct 14, 2025
Merged

Fix GCC warnings#9292
douzzer merged 8 commits intowolfSSL:masterfrom
embhorn:zd20626

Conversation

@embhorn
Copy link
Copy Markdown
Member

@embhorn embhorn commented Oct 10, 2025

Description

Customer reported warnings with strict rules enabled

Fixes zd20626

Testing

Tool confirmed

Checklist

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

@embhorn embhorn requested a review from Copilot October 10, 2025 20:38
@embhorn embhorn self-assigned this Oct 10, 2025
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 fixes GCC compiler warnings when strict rules are enabled, addressing customer-reported issues in ticket zd20626.

  • Added proper const qualifier to function parameter to fix const-correctness warnings
  • Implemented bounds checking for indent parameters to prevent format truncation warnings
  • Fixed code structure issues including unreachable code and duplicated branch warnings
  • Added pragma directives to suppress intentional duplicated branch warning

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wolfcrypt/src/evp.c Added const qualifier to src parameter in EvpCipherAesGCM function
src/x509.c Added MAX_INDENT constant and bounds checking for indent parameters across multiple print functions
src/tls.c Fixed unreachable code by adding proper null check and control flow for TLSX_Find result
src/ssl_bn.c Added GCC pragma to suppress intentional duplicated branches warning
src/pk.c Added bounds checking for indent parameter to prevent format truncation
src/internal.c Removed duplicate conditional code blocks that were causing compiler warnings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/x509.c
Comment thread src/ssl_bn.c
@embhorn embhorn requested a review from douzzer October 13, 2025 21:20
@douzzer douzzer merged commit b2c105d into wolfSSL:master Oct 14, 2025
337 of 338 checks passed
@embhorn embhorn deleted the zd20626 branch April 24, 2026 21:33
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.

3 participants