Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-2787

Compilation failure with `zig cc` (equivalent to clang 16)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • proton-c-0.39.0
    • proton-c-0.40.0
    • build, proton-c
    • None

    Description

      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:251:18: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
          while (batch = pn_proactor_get(p.get())) {
                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:251:18: note: place parentheses around the assignment to silence this warning
          while (batch = pn_proactor_get(p.get())) {
                       ^
                 (                               )
      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:251:18: note: use '==' to turn this assignment into an equality comparison
          while (batch = pn_proactor_get(p.get())) {
                       ^
                       ==
      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:253:16: error: using the result of an assignment as a condition without parentheses [-Werror,-Wparentheses]
            while (e = pn_event_batch_next(batch)) {
                   ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:253:16: note: place parentheses around the assignment to silence this warning
            while (e = pn_event_batch_next(batch)) {
                     ^
                   (                             )
      /home/jdanek/repos/qpid/qpid-proton/c/tests/raw_wake_test.cpp:253:16: note: use '==' to turn this assignment into an equality comparison
            while (e = pn_event_batch_next(batch)) {
                     ^
                     ==
      2 errors generated.
      

      Attachments

        Activity

          People

            jdanek Jiri Daněk
            jdanek Jiri Daněk
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: