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

compiler warnings #1843

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Conversation

hfstco
Copy link
Collaborator

@hfstco hfstco commented Feb 20, 2025

just a quick fix

[126/230] Building C object CMakeFiles/picoquic-test.dir/picoquictest/picoquic_ns.c.o
/Users/matthias/CLionProjects/picoquic/picoquictest/picoquic_ns.c:647:5: warning: '/*' within block comment [-Wcomment]
  647 |     /* reset the queue time to current_time, i.e., after packets in transit are delivered.*/
      |     ^
1 warning generated.
[143/230] Building C object CMakeFiles/picoquicdemo.dir/picoquicfirst/picoquicdemo.c.o
/Users/matthias/CLionProjects/picoquic/picoquicfirst/picoquicdemo.c:661:29: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
  661 |                     if (ret = picoquic_subscribe_new_path_allowed(cb_ctx->cnx_client, &is_already_allowed) == 0) {
      |                         ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/matthias/CLionProjects/picoquic/picoquicfirst/picoquicdemo.c:661:29: note: place parentheses around the assignment to silence this warning
  661 |                     if (ret = picoquic_subscribe_new_path_allowed(cb_ctx->cnx_client, &is_already_allowed) == 0) {
      |                             ^                                                                                  
      |                         (                                                                                      )
/Users/matthias/CLionProjects/picoquic/picoquicfirst/picoquicdemo.c:661:29: note: use '==' to turn this assignment into an equality comparison
  661 |                     if (ret = picoquic_subscribe_new_path_allowed(cb_ctx->cnx_client, &is_already_allowed) == 0) {
      |                             ^
      |                             ==
1 warning generated.

@hfstco hfstco requested a review from huitema February 20, 2025 12:03
Copy link
Collaborator

@huitema huitema left a comment

Choose a reason for hiding this comment

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

Thanks for fixing that!

@huitema huitema merged commit 4899fd9 into private-octopus:master Feb 21, 2025
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