Enforce C99 and wolfSSL coding standards - #19
Open
aidangarske wants to merge 4 commits into
Open
aidangarske wants to merge 4 commits into
aidangarske wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Five unresolved moderate findings leave dependency flags, VLA enforcement, style scanning, firmware flags, and generated-code checks incomplete.
Review effort: Lite
Findings: None
What changed in this PR
This pull request standardizes wolfTrust C builds on C99 and adds compiler, style, scope, and CI validation across host tests, firmware, and dependencies.
Changes:
- Adds C99 probes, compiler flags, host-suite coverage, and GCC/Clang CI.
- Replaces C11 assertions and prohibited
goto/standalone scopes. - Updates build files, documentation, and coding-standard checks.
| File | Reviewed change |
|---|---|
tests/host/wolfhsm_relay/user_settings.h |
Updates C99 documentation. |
tests/host/wolfhsm_relay/stubs/zephyr/logging/log.h |
Updates the logging stub for C99-compatible use. |
tests/host/wolfhsm_loopback/user_settings.h |
Updates C99 documentation. |
tests/host/vnet/test_pool.c |
Removes a standalone scope. |
tests/host/vnet_relay/Makefile |
Uses C99 compilation. |
tests/host/vault_service/Makefile |
Uses C99 compilation. |
tests/host/storage_service/Makefile |
Uses C99 compilation. |
tests/host/spm/Makefile |
Uses C99 compilation. |
tests/host/spm_gate/Makefile |
Uses C99 compilation. |
tests/host/sp_recovery/Makefile |
Uses C99 compilation. |
tests/host/sp_layout/Makefile |
Adds an include path and C99 flags. |
tests/host/sp_layout/main.c |
Replaces static assertions. |
tests/host/runtime_verify/Makefile |
Uses C99 compilation. |
tests/host/rollback/Makefile |
Uses C99 compilation. |
tests/host/qcbor_shim/user_settings.h |
Updates C99 documentation. |
tests/host/qcbor_shim/Makefile |
Uses C99 compilation. |
tests/host/qcbor_shim/main.c |
Removes a standalone scope. |
tests/host/psa_storage_client/Makefile |
Uses C99 compilation. |
tests/host/psa_headers/Makefile |
Uses C99 compilation. |
tests/host/psa_headers/main.c |
Replaces static assertions. |
tests/host/psa_ffm_client/Makefile |
Uses C99 compilation. |
tests/host/psa_ffm_client/main.c |
Replaces a static assertion. |
tests/host/psa_ff_upstream/Makefile |
Uses C99 and forwards extra flags. |
tests/host/ps_service/Makefile |
Uses C99 compilation. |
tests/host/port_binding/Makefile |
Uses C99 compilation. |
tests/host/negatives/user_settings.h |
Updates C99 documentation. |
tests/host/negatives/Makefile |
Uses C99 compilation. |
tests/host/manifest/test_generator.py |
Compiles generated code as C99. moderate (1 vote): Its hard-coded compiler command omits -Werror=vla and EXTRA_CFLAGS, allowing VLAs through make c99-check. |
tests/host/manifest/Makefile |
Uses C99 compilation. |
tests/host/Makefile |
Propagates C99 flags. moderate (1 vote): -pedantic-errors remains enabled for wolfCOSE sources because dependency flags filter only exact -pedantic and -Werror tokens. |
tests/host/lifecycle/Makefile |
Uses C99 compilation. |
tests/host/keystore_isolation/user_settings.h |
Updates C99 documentation. |
tests/host/ipc/Makefile |
Uses C99 compilation. |
tests/host/guest_verify/Makefile |
Uses C99 compilation. |
tests/host/fwu_service/Makefile |
Uses C99 compilation. |
tests/host/flash_nvm/Makefile |
Uses C99 compilation. |
tests/host/ffm/Makefile |
Uses C99 compilation. |
tests/host/ffm_veneer/Makefile |
Uses C99 compilation. |
tests/host/ffm_domain/Makefile |
Uses C99 compilation. |
tests/host/domain/Makefile |
Uses C99 compilation. |
tests/host/boot_handoff/Makefile |
Uses C99 compilation. |
tests/host/boot_handoff/main.c |
Replaces static assertions. |
tests/host/attestation/user_settings.h |
Updates C99 documentation. |
tests/host/attestation/Makefile |
Uses C99 compilation. |
tests/host/attestation_token/user_settings.h |
Updates C99 documentation. |
tests/host/attestation_token/Makefile |
Uses C99 compilation. |
tests/host/attestation_service/Makefile |
Uses C99 compilation. |
tests/host/attestation_replay/user_settings.h |
Updates C99 documentation. |
tests/host/attestation_replay/Makefile |
Uses C99 compilation. |
tests/host/attestation_negatives/user_settings.h |
Updates C99 documentation. |
tests/host/attestation_negatives/Makefile |
Uses C99 compilation. |
tests/host/attestation_iak/user_settings.h |
Updates C99 documentation. |
tests/host/attestation_golden/user_settings.h |
Updates C99 documentation. |
tests/host/attestation_golden/Makefile |
Uses C99 compilation. |
tests/fuzz/Makefile |
Uses C99 compilation. |
tests/firmware/zephyr-stm32h5/apps/freertos_guest1/main.c |
Removes goto control flow. |
tests/firmware/stm32h563/Makefile |
Uses C99 firmware flags. moderate (1 vote): The default WT_ENGINE_HSM=1 path omits shared C99 and VLA flags from the effective secure and nonsecure compiler flags. |
tests/firmware/stm32h563-vnet/nonsecure/guest.c |
Removes standalone scopes. |
tests/firmware/stm32h563-vnet/Makefile |
Uses C99 guest flags. |
tests/c99/valid.c |
Adds a valid C99 probe. |
tests/c99/invalid_vla.c |
Adds a VLA rejection probe. |
tests/c99/invalid_c11.c |
Adds a C11 syntax rejection probe. |
tests/c99/check.sh |
Runs compiler compliance checks. |
src/services/wolfhsm/wt_hsm.c |
Replaces a static assertion. |
src/services/wolfhsm/runner/user_settings.h |
Enables required dependency ABI support. |
src/arch/armv8m/guest_context_armv8m.c |
Replaces layout assertions. |
src/arch/armv8m/coroutine_armv8m.c |
Replaces layout assertions. |
scripts/check-empty-brace-scopes.py |
Detects standalone C scopes. |
scripts/check_house_style.sh |
Adds house-style checks. moderate (1 vote): The URL exemption filters whole lines, allowing a forbidden // comment on a line containing an allowed URL. |
mk/common.mk |
Adds secure-build C99 flags. moderate (1 vote): -Werror=vla is limited to the host-only gate, so secure image, firmware, and fuzz builds can still accept VLAs. |
Makefile |
Adds the C99 check target. |
include/wolftrust/static_assert.h |
Provides C99-compatible assertions. |
docs/Coding-Standard.md |
Documents coding requirements. |
docs/_Sidebar.md |
Links the coding standard. |
.github/workflows/README.md |
Documents new CI gates. |
.github/workflows/house-style.yml |
Runs house-style checks. |
.github/workflows/empty-brace-scan.yml |
Runs scope scanning. |
.github/workflows/c99-compliance.yml |
Runs GCC and Clang C99 checks. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
aidangarske
force-pushed
the
ci/c99-wolfssl-standards
branch
from
September 22, 2026 21:12
d6954e6 to
ccf3800
Compare
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #19
Scan targets checked: wolftrust-src, wolftrust-bugs
Fenrir result: Approved ✅
No new issues found in the changed files.
Advisory only — this automated result does not count as a GitHub approval.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.