boot/nxboot: fix Clang warnings for format and va_start#3419
boot/nxboot: fix Clang warnings for format and va_start#3419neilberkman wants to merge 1 commit intoapache:masterfrom
Conversation
Use PRIdOFF instead of %ld for off_t arguments in flash.c syslog calls, fixing -Wformat errors when off_t is not long. Change nxboot_progress parameter from enum progress_type_e to int to avoid undefined behavior from va_start on a parameter that undergoes default argument promotion (-Wvarargs). Signed-off-by: Neil Berkman <neil@xuku.com>
linguini1
left a comment
There was a problem hiding this comment.
Just noting the failure can be seen: https://github.com/apache/nuttx/actions/runs/22828785374/job/66215539259?pr=18509
|
@michallenc could you please take a look as the code author? :-) |
michallenc
left a comment
There was a problem hiding this comment.
LGTM. The canceled checks in CI are correct?
|
Thank you @michallenc :-) GH CI is problematic recently. CI restarted :-) |
cederom
left a comment
There was a problem hiding this comment.
Thank you @neilberkman :-) Lets just make sure CI pass fine :-)
Thanks! Unfortunately, looks like the rerun failed as well. This does all appear to be due to infrastructure issues, unrelated to the PR itself. |
|
Yup GH seems to be doing some upgrades recently and lots of CI fails due to different reasons :-P |
Summary
Fix two Clang
-Werrorfailures when building nxboot withCONFIG_ARM_TOOLCHAIN_CLANG:loader/flash.c: usePRIdOFFinstead of%ldforoff_targuments in syslog calls, fixing-Wformatwhenoff_tis notlong.nxboot_main.c/nxboot.h: changenxboot_progressparameter fromenum progress_type_etointto avoid undefined behavior fromva_starton a parameter that undergoes default argument promotion (-Wvarargs).Impact
Fixes build failures for any board config that enables nxboot with Clang (e.g. nucleo-h743zi/nxboot-loader, nucleo-h743zi/nxboot-app in apache/nuttx#18509).
Testing
Build: nucleo-h743zi/nxboot-loader and nucleo-h743zi/nxboot-app with
CONFIG_ARM_TOOLCHAIN_CLANG.