Improve testcases for unsigned char platforms#5524
Merged
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom Oct 7, 2023
moui0:main
Merged
Improve testcases for unsigned char platforms#5524chrchr-github merged 1 commit intocppcheck-opensource:mainfrom moui0:main
chrchr-github merged 1 commit intocppcheck-opensource:mainfrom
moui0:main
Conversation
moui0
added a commit
to moui0/archriscv-packages
that referenced
this pull request
Oct 7, 2023
Improve cppcheck testcases on `unsigned char` platform. Upstreamed: cppcheck-opensource/cppcheck#5524
Collaborator
Contributor
Author
|
Is it possible to fix this problem by modifying Perhaps a similar code block can be added for signed, but this may lead to similar issues in many testcases on the x86 platform: |
felixonmars
pushed a commit
to felixonmars/archriscv-packages
that referenced
this pull request
Oct 7, 2023
Improve cppcheck testcases on `unsigned char` platform. Upstreamed: cppcheck-opensource/cppcheck#5524
Collaborator
|
@moui0 How do you want to be credited as an author? |
Contributor
Author
|
Wang Haoyu, please. Thank you! |
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.
I got error messages while building
cppcheck 2.12.0for RISC-V Arch Linux:I found out the reason is that the testcases were designed for x86/x86_64 or other
signed charplatforms (i.e. default character type issigned char), whereareas RISC-V is anunsigned charplatform, which causes different behavior inlib/valueflow.cpp:valueFlowImpossibleValues. I'm not sure whether this error leads from a functional bug, so if you have a better approach to fix it, please let me know.Maybe you could reproduce this error on x86_64 platform by setting
defaultSign = 'u';inPlatform::set(Type t).