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

fix: __cpuidex pointer type warning #864

Merged
merged 1 commit into from Jul 15, 2023

Conversation

t-mat
Copy link
Contributor

@t-mat t-mat commented Jul 15, 2023

clang-cl warns the first argument of __cpuidex() because it's int[].

void __cpuidex(
   int cpuInfo[4],
   int function_id,
   int subfunction_id
);

https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex

Without this patch, it reports the following warning

xxHash\xxh_x86dispatch.c(258,15): warning : passing 'xxh_u32 *'
(aka 'unsigned int *') to parameter of type 'int *' converts between pointers
to integer types with different sign [-Wpointer-sign]

clang-cl warns the first argument of __cpuidex() because it's int[].

void __cpuidex(
   int cpuInfo[4],
   int function_id,
   int subfunction_id
);

https://learn.microsoft.com/en-us/cpp/intrinsics/cpuid-cpuidex
@Cyan4973 Cyan4973 merged commit f5cbcb8 into Cyan4973:dev Jul 15, 2023
58 checks passed
@t-mat t-mat deleted the fix/clang-cl-sign-warning branch July 15, 2023 18:36
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.

None yet

2 participants