fix truncation of token flags#4727
fix truncation of token flags#4727danmar merged 1 commit intocppcheck-opensource:mainfrom IOBYTE:main
Conversation
|
|
|
|
That makes no sense. mFlags is a uint64_t. Are you sure you have a clean checkout? What is your platform and compiler? |
|
Visual Studio gave 2 warnings for the size mismatch before this patch and none after. |
|
The warning I posted is currently disabled. Along with the other conversion warnings. Fixes for those are not wanted. To be fair the signed/unsigned warnings were/are really buggy which makes things messy. But the implicit shortening/truncation warnings are safe. |
|
Where is the truncation with this patch? Changing the argument and return type back to unsigned int is obviously wrong because you are throwing away bits that are being used. This even fixes a bailout because fIsSimplifiedTypedef was being discarded. This is fixing a real bug that also happens to be a real and valid warning. I don't understand what the problem is. |
|
Ah, now I get it. The warning is with the code before your patch. |
|
See also cppcheck-opensource/simplecpp#270. |
|
I'm not a developer anymore so can someone else merge this? |
|
@IOBYTE good to see you hope you are well! |
|
I'm doing good. Hope you and your family are too. Retirement is great but getting old sucks. |
No description provided.