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

thread.h:1313:20: warning: cast to 'thread_tls_t' (aka 'void *') from smaller integer type 'pthread_key_t' (aka 'unsigned int') #65

Open
Wertzui123 opened this issue Nov 11, 2023 · 3 comments

Comments

@Wertzui123
Copy link

No description provided.

@mattiasgustavsson
Copy link
Owner

Which platform/compiler?

@Wertzui123
Copy link
Author

Oops, I forgot to mention that. I get this warning when cross-compiling from Windows to Linux using zig cc; with gcc on linux I get:

thread.h:1313:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

@bullno1
Copy link

bullno1 commented May 1, 2024

The Linux code basically treats the pointer as a number anw. Just need an intermediate casting step to uintptr_t to suppress the warning.

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

No branches or pull requests

3 participants