Skip to content

Conversation

@firewave
Copy link
Collaborator

@firewave firewave commented Sep 9, 2023

No description provided.

@firewave
Copy link
Collaborator Author

firewave commented Sep 9, 2023

Some preliminary cleanups for #5414.

@firewave firewave force-pushed the cfg-std branch 2 times, most recently from 3f16a49 to 5b634aa Compare September 12, 2023 19:25
@firewave firewave marked this pull request as ready for review September 12, 2023 19:26
@danmar danmar merged commit 5eb1750 into danmar:main Sep 13, 2023
@firewave firewave deleted the cfg-std branch September 13, 2023 08:48
@chrchr-github
Copy link
Collaborator

I think the macros like UINT32_C(x) should just be uint32_t(x). At the moment, a 64bit value is created e.g. on unix64.
That seems to cause

compareValueOutOfTypeRangeError
ftp://ftp.de.debian.org/debian/pool/main/libr/librandomx/librandomx_1.1.10.orig.tar.gz
head RandomX-1.1.10/src/argon2_core.c:197:6: style: Comparing expression of type 'const unsigned int' against value 0. Condition is always false. [compareValueOutOfTypeRangeError]
head RandomX-1.1.10/src/argon2_core.c:201:6: style: Comparing expression of type 'const unsigned int' against value 4294967295. Condition is always false. [compareValueOutOfTypeRangeError]

Although we should also warn for 32bit values, unless I'm missing something.

@firewave
Copy link
Collaborator Author

Thanks for pointing that out.
I wanted to add some tests for this but forgot to switch it to a draft. Will do that in the other PR.

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.

3 participants