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

libc/scanf-advanced: fix type usage #388

Merged
merged 1 commit into from
Jan 23, 2025
Merged

libc/scanf-advanced: fix type usage #388

merged 1 commit into from
Jan 23, 2025

Conversation

lukileczo
Copy link
Member

@lukileczo lukileczo commented Jan 21, 2025

Description

hhx format specifier was used with int type in test modifiers_mix, which is incorrect. This caused the test to fail on big endian architectures (SPARC), as the value was written to the wrong address - the most significant byte. Type was changed to unsigned char to be compatible with the specifier.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (refactoring, style fixes, git/CI config, submodule management, no code logic changes)

How Has This Been Tested?

  • Already covered by automatic testing.
  • New test added: (add PR link here).
  • Tested by hand on: sparcv8leon-generic-qemu

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing linter checks and tests passed.
  • My changes generate no new compilation warnings for any of the targets.

Special treatment

  • This PR needs additional PRs to work (list the PRs, preferably in merge-order).
  • I will merge this PR by myself when appropriate.

@lukileczo lukileczo marked this pull request as ready for review January 21, 2025 14:21
@lukileczo lukileczo requested a review from damianloew January 21, 2025 14:21
Copy link

github-actions bot commented Jan 21, 2025

Unit Test Results

7 958 tests  +948   7 416 ✅ +881   40m 4s ⏱️ + 5m 37s
  470 suites + 58     542 💤 + 67 
    1 files   ±  0       0 ❌ ±  0 

Results for commit a67924f. ± Comparison against base commit 7da6e4f.

♻️ This comment has been updated with latest results.

@damianloew damianloew requested a review from adamdebek January 21, 2025 14:28
`hhx` format specifier was used with int type, which is incorrect.
This caused the test to fail on big endian architectures, as the value
was written to the wrong address. Type was changed to `unsigned char`.

JIRA: CI-522
@lukileczo lukileczo merged commit c1e793d into master Jan 23, 2025
36 checks passed
@lukileczo lukileczo deleted the lukileczo/ci-522 branch January 23, 2025 13:45
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.

2 participants