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

Add pragma to ignore int conversion warning in pktlatency.h #144

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

zquestz
Copy link
Contributor

@zquestz zquestz commented Dec 4, 2024

I couldn't compile the latest code without adding this.

Otherwise I got the error:

incompatible integer to pointer conversion assigning to 'struct socket *' from '__u64' (aka 'unsigned long long')

Copy link

vercel bot commented Dec 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kyanos ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2024 1:36am

@hengyoush
Copy link
Owner

hengyoush commented Dec 4, 2024

Thank you for your contribution!

But I think it might be simpler to add the appropriate type cast where the warning occurs. For example, change sk = PT_REGS_RC_CORE(ctx); to sk = (struct socket *) PT_REGS_RC_CORE(ctx);

@zquestz
Copy link
Contributor Author

zquestz commented Dec 4, 2024

No worries, I was just following the pattern I saw in other files. =)

@hengyoush hengyoush merged commit e98ac66 into hengyoush:main Dec 4, 2024
10 checks passed
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.

2 participants