arch/arm: Fix the compilation error#18734
Merged
simbit18 merged 1 commit intoapache:masterfrom Apr 14, 2026
Merged
Conversation
When the macro SDADC_HAVE_TIMER is enabled, a compilation error will occur due to the missing semicolon after the variable. Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
simbit18
approved these changes
Apr 14, 2026
xiaoxiang781216
approved these changes
Apr 14, 2026
linguini1
approved these changes
Apr 14, 2026
anchao
approved these changes
Apr 14, 2026
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.
When the macro SDADC_HAVE_TIMER is enabled, a compilation error will occur due to the missing semicolon after the variable.
Note: Please adhere to Contributing Guidelines.
Summary
This PR fixes a compilation error caused by a missing semicolon at the end of the jextsel variable declaration. The error is triggered when the macro SDADC_HAVE_TIMER is enabled: the jextsel variable (used to store the JEXTSEL value for the SDADC block) lacks a trailing semicolon, which violates C syntax rules and blocks the build process. This change only adds the missing semicolon to the jextsel variable definition under the SDADC_HAVE_TIMER macro guard, with no other logic modifications—ensuring compliance with C syntax and resolving the compilation failure.
Impact
Build process: Resolves the compilation error that occurs when SDADC_HAVE_TIMER is enabled; no impact on build logic or output for scenarios where this macro is disabled.
Users/Hardware: No functional changes to SDADC or timer-related features; the behavior of the SDADC block and associated timer (base address, PCLK frequency, conversion frequency) remains unchanged. Only fixes a syntax error that prevented successful compilation for users enabling the SDADC_HAVE_TIMER macro.
Compatibility/Security: Fully backward-compatible—no breaking changes to existing code, APIs, or hardware interactions. No security implications as this is a pure syntax correction.
Documentation: No changes to documentation are required, as this is a bug fix for a syntax error rather than a feature modification.
Testing
Host OS: Ubuntu 22.04 LTS (x86_64)
Toolchain: GNU Arm Embedded Toolchain 10.3-2021.10 (arm-none-eabi-gcc)
Build system: GNU Make 4.3
Target board: STM32H743I-EVAL (SDADC peripheral and timer functionality are supported)
Configuration: Enabled the SDADC_HAVE_TIMER macro via menuconfig (Configuration → Drivers → Analog → SDADC → Enable timer support for SDADC)
Pre-fix compilation error log:
plaintext
CC: drivers/analog/stm32_sdadc.c
../drivers/analog/stm32_sdadc.c:456:16: error: expected ';' before 'uint32_t'
uint32_t pclck; /* The PCLK frequency that drives this timer /
^~~~~~
;
../drivers/analog/stm32_sdadc.c:455:16: note: in this expansion of SDADC_HAVE_TIMER
uint32_t jextsel / JEXTSEL value used by this SDADC block */
^~~~~~~
make: *** [Makefile:1247: drivers/analog/stm32_sdadc.o] Error 1
PRs without testing information will not be accepted. We will
request test logs.
Post-fix build success log:
plaintext
CC: drivers/analog/stm32_sdadc.c
AR: drivers/analog/libanalog.a
LD: nuttx.elf
OBJCOPY: nuttx.bin
OBJDUMP: nuttx.dis
Checked all other code paths under SDADC_HAVE_TIMER (timer base address, PCLK frequency, conversion frequency variables) to confirm no other syntax issues.
Tested builds with SDADC_HAVE_TIMER disabled: no compilation warnings/errors, and existing SDADC functionality remains intact.