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

gh-123189: [Modules/blake2module.c]: Move function definitions and their usage under the macros #123190

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

Eclips4
Copy link
Member

@Eclips4 Eclips4 commented Aug 21, 2024

@Eclips4
Copy link
Member Author

Eclips4 commented Aug 21, 2024

cc @msprotz

Copy link
Contributor

@msprotz msprotz left a comment

Choose a reason for hiding this comment

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

Is there a more python-idiomatic way of doing this? I remember seeing something like Py_Unused that might have helped with these warnings.

@Eclips4
Copy link
Member Author

Eclips4 commented Aug 21, 2024

Is there a more python-idiomatic way of doing this? I remember seeing something like Py_Unused that might have helped with these warnings.

Py_UNUSED is used for arguments in function declarations, so unfortunately we can't use it :(

@msprotz
Copy link
Contributor

msprotz commented Aug 21, 2024

ok, worst case, you could do (void)st; if you wanted to avoid the #ifdef logic, but I don't think it matters too much. thanks for the followup fix

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

With this fix:

» make
gcc  -I./Modules/_hacl/include -fno-strict-overflow -Wsign-compare -g -Og -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include  -fstack-protector-strong -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden  -I./Include/internal -I./Include/internal/mimalloc  -I. -I./Include -I/opt/homebrew/opt/openssl/include -I/opt/homebrew/opt/openssl/include   -c ./Modules/blake2module.c -o Modules/blake2module.o
gcc -bundle -undefined dynamic_lookup -L/opt/homebrew/opt/openssl/lib -L/opt/homebrew/opt/openssl/lib    Modules/blake2module.o  Modules/_hacl/libHacl_Hash_Blake2.a  -o Modules/_blake2.cpython-314d-darwin.so
The necessary bits to build these optional modules were not found:
_gdbm                     _tkinter                                         
To find the necessary bits, look in configure.ac and config.log.

Checked 112 modules (34 built-in, 76 shared, 0 n/a on macosx-14.5-arm64, 0 disabled, 2 missing, 0 failed on import)

Thank you!

@sobolevn sobolevn merged commit 8aaf752 into python:main Aug 30, 2024
39 checks passed
@Eclips4 Eclips4 deleted the fix-warnings branch August 30, 2024 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants