Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • Lustre 2.13.0
    • None
    • None
    • C++
    • 9223372036854775807

    Description

      If one tries to compile a C++ program with the `lustre/lustreapi.h` header, the compiler will throw all kinds of warnings.

      This issue came up on the mailing list a few years ago: http://lists.lustre.org/pipermail/lustre-discuss-lustre.org/2017-March/014268.html and I encountered it again in a different context this week. Guess not many C++ programs try to use lustreapi.h !

      Attachments

        Activity

          [LU-12527] lustreapi.h not c++ compatible
          pjones Peter Jones added a comment -

          Landed for 2.13 - congrats Rob!

          pjones Peter Jones added a comment - Landed for 2.13 - congrats Rob!

          Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35471/
          Subject: LU-12527 utils: Make lustre_user.h c++-legal
          Project: fs/lustre-release
          Branch: master
          Current Patch Set:
          Commit: 14b11dc3526ad12a138ad750ab8824b3438dc00d

          gerrit Gerrit Updater added a comment - Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35471/ Subject: LU-12527 utils: Make lustre_user.h c++-legal Project: fs/lustre-release Branch: master Current Patch Set: Commit: 14b11dc3526ad12a138ad750ab8824b3438dc00d
          robl Robert Latham added a comment - https://review.whamcloud.com/#/c/35471/

          Rob Latham (robl@mcs.anl.gov) uploaded a new patch: https://review.whamcloud.com/35471
          Subject: LU-12527 utils: Make lustre_user.h c++-legal
          Project: fs/lustre-release
          Branch: master
          Current Patch Set: 1
          Commit: e23c74817c7d1d2d2993e6a55bd4a899bfca342d

          gerrit Gerrit Updater added a comment - Rob Latham (robl@mcs.anl.gov) uploaded a new patch: https://review.whamcloud.com/35471 Subject: LU-12527 utils: Make lustre_user.h c++-legal Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: e23c74817c7d1d2d2993e6a55bd4a899bfca342d
          pjones Peter Jones added a comment -

          Try now Rob

          pjones Peter Jones added a comment - Try now Rob

          I'm going through the process. info@whamcloud probably gets a ton of spam, but it also got a request from me asking for permission to push to gerrit.

          robl Robert Latham added a comment - I'm going through the process. info@whamcloud probably gets a ton of spam, but it also got a request from me asking for permission to push to gerrit.
          pjones Peter Jones added a comment -

          Rob

          Thank you for the bug report and patch. Are you able to submit your patch directly to Gerrit (see http://wiki.lustre.org/Using_Gerrit for details)? If not, then we can assign this ticket to another developer, but it will likely take longer to get attention

          Peter

          pjones Peter Jones added a comment - Rob Thank you for the bug report and patch. Are you able to submit your patch directly to Gerrit (see http://wiki.lustre.org/Using_Gerrit for details)? If not, then we can assign this ticket to another developer, but it will likely take longer to get attention Peter

          Here's a rough patch that makes g++ and clang++ happy.

          robl Robert Latham added a comment - Here's a rough patch that makes g++ and clang++ happy.

          I attached a small C++ program to demonstrate the error. Both `clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)` and `g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0` give errors.

          robl Robert Latham added a comment - I attached a small C++ program to demonstrate the error. Both `clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)` and `g++ (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0` give errors.

          People

            robl Robert Latham
            robl Robert Latham
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: