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

Fixed a warning about comma misuse #16644

Conversation

MonkeybreadSoftware
Copy link
Contributor

I build my stuff with a lot of checks and warnings.
So I got this one, where clang complains about the comma misuse.
Why is f initialized in the for and not just before?
Unless there is some special real, I'd like to move it up.

.../curl-test/curl/lib/easy.c:568:21: warning: possible misuse of comma operator here [-Wcomma]
  568 |     for(m = ev->list, f = &fds[0]; m; m = m->next) {
      |                     ^
.../curl-test/curl/lib/easy.c:568:9: note: cast expression to void to silence warning
  568 |     for(m = ev->list, f = &fds[0]; m; m = m->next) {
      |         ^~~~~~~~~~~~
      |         (void)(     )

@bagder bagder closed this in fc04eca Mar 10, 2025
@bagder
Copy link
Member

bagder commented Mar 10, 2025

Thanks!

@icing
Copy link
Contributor

icing commented Mar 10, 2025

sigh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants