Repository navigation
Isobus logformat updates - #636
Merged
Merged
Conversation
Several log messages used format specifiers which did not match the types of the provided arguments (e.g. %d or %i for size_t/ssize_t, %ld for int64_t/time_t and size_t for the '.*' precision). On 64 bit hosts (and for int64_t/time_t on 32 bit hosts) this leads to wrong output or undefined behaviour when the log level is enabled. Additionally the seek response position was compared to the requested offset without le32toh() conversion which fails on big endian hosts. Fix the format specifiers and add the missing le32toh() conversion. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
All pr_*() log macros use isobusfs_log() which was declared without a format attribute. Therefore the compiler did not check the format strings against the provided arguments. Add __attribute__((format(printf, 2, 3))) to let the compiler detect mismatching format specifiers. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Contributor
|
LGTM. Thx! |
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.
just some missing cleanups and fixing from the LLM session