Skip to content

Fix initialization of string in otp_keystore tag#772

Merged
mattia-moffa merged 1 commit intowolfSSL:masterfrom
danielinux:otp-fix-string
May 6, 2026
Merged

Fix initialization of string in otp_keystore tag#772
mattia-moffa merged 1 commit intowolfSSL:masterfrom
danielinux:otp-fix-string

Conversation

@danielinux
Copy link
Copy Markdown
Member

Emerged in newer gcc15, due to -Wunterminated-string-initialization added to -Wall

This one-line fixes the initialization of the string and removes the build warning/error from the OTP DICE test.

Emerged in newer gcc15, due to -Wunterminated-string-initialization
added to -Wall
Copilot AI review requested due to automatic review settings May 6, 2026 08:24
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 a GCC 15 -Wunterminated-string-initialization warning/error by changing the OTP keystore header magic initialization from a string literal to an explicit 8-byte character initializer, matching how the value is used (byte-wise memcmp/memcpy) in the OTP keystore implementation and tools.

Changes:

  • Replace static const char KEYSTORE_HDR_MAGIC[8] = "WOLFBOOT"; with an explicit 8-byte initializer list to avoid unterminated-string initialization warnings.

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

@mattia-moffa mattia-moffa merged commit d69086c into wolfSSL:master May 6, 2026
376 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.

3 participants