Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-3902

Fix protobuf compiler warning with clang

    Details

    • Type: Improvement
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: protobuf, Qserv
    • Labels:
      None

      Attachments

        Issue Links

          Activity

          Hide
          tjenness Tim Jenness added a comment -

          I don't know enough C++ to comment usefully on this fix. It seems like clang knows what is happening but is also indicating that it's not part of the C++11 standard so warns because of the compiler flags.

          Show
          tjenness Tim Jenness added a comment - I don't know enough C++ to comment usefully on this fix. It seems like clang knows what is happening but is also indicating that it's not part of the C++11 standard so warns because of the compiler flags.
          Hide
          ktl Kian-Tat Lim added a comment -

          Is it simpler to just name the internal union without yanking it outside? I think that would also eliminate the possibility of the internal union's name colliding with anything else.

          Show
          ktl Kian-Tat Lim added a comment - Is it simpler to just name the internal union without yanking it outside? I think that would also eliminate the possibility of the internal union's name colliding with anything else.
          Hide
          fritzm Fritz Mueller added a comment -

          I don't think that's allowed – I'll give it a try and see and if so I'll do that.

          Show
          fritzm Fritz Mueller added a comment - I don't think that's allowed – I'll give it a try and see and if so I'll do that.
          Hide
          fritzm Fritz Mueller added a comment -

          Ya, nope:

          ./google/protobuf/unknown_field_set.h:214:11: error: types cannot be declared in an anonymous union
              union length_delimited {
          

          Even in the yanked out version, it's still private, so it shouldn't cause any conflicts.

          Show
          fritzm Fritz Mueller added a comment - Ya, nope: ./google/protobuf/unknown_field_set.h:214:11: error: types cannot be declared in an anonymous union union length_delimited { Even in the yanked out version, it's still private, so it shouldn't cause any conflicts.
          Hide
          ktl Kian-Tat Lim added a comment -

          OK, g++ didn't complain . I'm fine with what you have.

          Show
          ktl Kian-Tat Lim added a comment - OK, g++ didn't complain . I'm fine with what you have.
          Hide
          fritzm Fritz Mueller added a comment -

          Tagged and bagged as protobuf-2.6.1.lsst2

          Show
          fritzm Fritz Mueller added a comment - Tagged and bagged as protobuf-2.6.1.lsst2

            People

            • Assignee:
              fritzm Fritz Mueller
              Reporter:
              fritzm Fritz Mueller
              Reviewers:
              Kian-Tat Lim, Tim Jenness
              Watchers:
              Fritz Mueller, Kian-Tat Lim, Tim Jenness
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel