summaryrefslogtreecommitdiff
path: root/common_modules
diff options
context:
space:
mode:
authorFrédéric Desbiens <[email protected]>2026-09-28 14:02:49 -0400
committerGitHub <[email protected]>2026-09-28 14:02:49 -0400
commit9bf9978e9507bfef4fbffa283d36aaedc0ac7508 (patch)
treed984c72c3ff6490cda351dd089a60cf5a20b7893 /common_modules
parentf65727f58529c4ff6b235a0c169e6daa9937c633 (diff)
Silenced the SMP MISRA shim's implicit conversions (#751)
common_smp/src/tx_misra.c performs four implicit conversions that its monoprocessor twin makes explicit, and ignores a parameter the twin casts to void. Built with the warning set common_smp uses, the file reports five diagnostics that common/src/tx_misra.c does not: tx_misra.c:49 conversion to 'int' from 'UINT' may change the sign of the result tx_misra.c:93 conversion to 'ULONG' from 'int' may change the sign of the result tx_misra.c:151 the same tx_misra.c:221 the same tx_misra.c:624 unused parameter 'status' The two files are otherwise the same shim, so this is drift rather than a deliberate difference: common/src already carries (INT) on the memset value, (ULONG) on the three pointer differences, and (VOID)status. That the shim is the file reporting them is the reason to fix it. It exists to route the kernel's pointer conversions through functions a MISRA analysis can account for, and an implicit signed-to-unsigned conversion inside it is the class of construct it was written to remove. The test trees hide it. test/tx builds the kernel with -Werror, so the monoprocessor copy could never have regressed this way; test/smp has -Werror commented out, so the SMP copy warns and builds. Applying the monoprocessor form to all five sites. Object code is byte identical before and after, compared with --strip-debug at -m32 -std=c99 with TX_MISRA_ENABLE defined, so this changes diagnostics and nothing else. Assisted-by: Claude Code (Opus 5) <[email protected]>
Diffstat (limited to 'common_modules')
0 files changed, 0 insertions, 0 deletions