[LU-12527] lustreapi.h not c++ compatible Created: 09/Jul/19 Updated: 15/Aug/19 Resolved: 15/Aug/19 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.13.0 |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Robert Latham | Assignee: | Robert Latham |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
C++ |
||
| Attachments: |
|
| Rank (Obsolete): | 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 ! |
| Comments |
| Comment by Robert Latham [ 09/Jul/19 ] |
|
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. |
| Comment by Robert Latham [ 10/Jul/19 ] |
|
Here's a rough patch that makes g++ and clang++ happy. |
| Comment by Peter Jones [ 11/Jul/19 ] |
|
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 |
| Comment by Robert Latham [ 11/Jul/19 ] |
|
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. |
| Comment by Peter Jones [ 11/Jul/19 ] |
|
Try now Rob |
| Comment by Gerrit Updater [ 11/Jul/19 ] |
|
Rob Latham (robl@mcs.anl.gov) uploaded a new patch: https://review.whamcloud.com/35471 |
| Comment by Robert Latham [ 11/Jul/19 ] |
| Comment by Gerrit Updater [ 15/Aug/19 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/35471/ |
| Comment by Peter Jones [ 15/Aug/19 ] |
|
Landed for 2.13 - congrats Rob! |