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

Fix "%hhi" conversion for kvprintf() #1290

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

sebhub
Copy link
Contributor

@sebhub sebhub commented Jun 13, 2024

The signedness of "char" is implementation-dependent.

Copy link
Contributor

@gmshake gmshake left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Member

@bsdimp bsdimp left a comment

Choose a reason for hiding this comment

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

I think this is good. It's a nop everywhere today (arm moved to signed char with EABI).

@sebhub
Copy link
Contributor Author

sebhub commented Jun 28, 2024

We use this function in the RTEMS real-time operating system. I came across this issue while writing validation tests for it on an arm target. Here, "char" is still unsigned:

https://developer.arm.com/documentation/den0013/d/Porting/Miscellaneous-C-porting-issues/unsigned-char-and-signed-char

@bsdimp
Copy link
Member

bsdimp commented Jun 28, 2024

We use this function in the RTEMS real-time operating system. I came across this issue while writing validation tests for it on an arm target. Here, "char" is still unsigned:

https://developer.arm.com/documentation/den0013/d/Porting/Miscellaneous-C-porting-issues/unsigned-char-and-signed-char

Ah yes. I was sure that EABI had changed that.... In any event, I think the changes is good and will land it soon.

The signedness of "char" is implementation-dependent.

Reviewed by: imp,zlei,nightquick@proton.me
Pull Request: freebsd#1290
@bsdimp bsdimp force-pushed the fix-hhi-conversion-for-kvprintf branch from d71ce25 to fc3e533 Compare June 28, 2024 15:00
@freebsd-git freebsd-git merged commit fc3e533 into freebsd:main Jun 28, 2024
7 of 9 checks passed
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Oct 29, 2024
The signedness of "char" is implementation-dependent.

Reviewed by: imp,zlei,nightquick@proton.me
Pull Request: freebsd/freebsd-src#1290
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.

5 participants