Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid format error on i686 #211

Merged
merged 1 commit into from Apr 5, 2022
Merged

Avoid format error on i686 #211

merged 1 commit into from Apr 5, 2022

Conversation

itd0
Copy link
Contributor

@itd0 itd0 commented Apr 4, 2022

Follow up to #209


On i686 definition of off_t and ssize_t differ. Update format length
modifiers as needed to avoid format errors with GCC.

Copy link
Member

@frozencemetery frozencemetery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor thing inline; otherwise looks okay.

src/esl-iter.c Outdated
@@ -308,13 +308,13 @@ esl_list_iter_next_with_size_correction(esl_list_iter *iter, efi_guid_t *type,
return -1;
}
if (iter->offset < 0) {
efi_error("iter->offset (%zd) < 0", iter->offset);
efi_error("iter->offset (%jd) < 0", (uintmax_t) iter->offset);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

off_t is a signed type, so intmax_t is more clear on these, I think. (Also, project style is no space after cast.) This applies to all the iter->offset handling below as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks.

On i686 definition of off_t and ssize_t differ.  Update format length
modifiers as needed to avoid format errors with GCC.

Signed-off-by: itd0 <69421122+itd0@users.noreply.github.com>
@frozencemetery frozencemetery merged commit 15622b7 into rhboot:main Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants