Use an array for an unused byte #698

Open
gilles-peskine-arm wants to merge 1 commit from gilles-peskine-arm/sha3-coverity-20260224 into development
gilles-peskine-arm commented 2026-02-24 08:44:18 -06:00 (Migrated from github.com)

The code is fine either way. But using an array avoids a false positive from Coverity about using a scalar as an array (Coverity doesn't notice that it's an array of length 0).

PR checklist

Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line.
If the provided content is part of the present PR remove the # symbol.

  • changelog provided | not required because: test only
  • framework PR not required
  • mbedtls development PR not required because: crypto only
  • mbedtls 3.6 PR not required because: code not in 3.6
  • tests provided | not required because:
The code is fine either way. But using an array avoids a false positive from Coverity about using a scalar as an array (Coverity doesn't notice that it's an array of length 0). ## PR checklist Please remove the segment/s on either side of the | symbol as appropriate, and add any relevant link/s to the end of the line. If the provided content is part of the present PR remove the # symbol. - [x] **changelog** provided | not required because: test only - [x] **framework PR** not required - [x] **mbedtls development PR** not required because: crypto only - [x] **mbedtls 3.6 PR** not required because: code not in 3.6 - **tests** provided | not required because:
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'gilles-peskine-arm/sha3-coverity-20260224:gilles-peskine-arm/sha3-coverity-20260224'
git switch 'gilles-peskine-arm/sha3-coverity-20260224'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'development'
git merge --no-ff 'gilles-peskine-arm/sha3-coverity-20260224'
git switch 'gilles-peskine-arm/sha3-coverity-20260224'
git rebase 'development'
git switch 'development'
git merge --ff-only 'gilles-peskine-arm/sha3-coverity-20260224'
git switch 'gilles-peskine-arm/sha3-coverity-20260224'
git rebase 'development'
git switch 'development'
git merge --no-ff 'gilles-peskine-arm/sha3-coverity-20260224'
git switch 'development'
git merge --squash 'gilles-peskine-arm/sha3-coverity-20260224'
git switch 'development'
git merge --ff-only 'gilles-peskine-arm/sha3-coverity-20260224'
git switch 'development'
git merge 'gilles-peskine-arm/sha3-coverity-20260224'
git push origin 'development'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!698
No description provided.