LU-4987 lustre: Remove static declaration in anonymous union
It is not permitted in C++ to have a static declaration inside
of an anonymous union. Before "LUSTRE_ANONYMOUS_UNION_NAME"
was added to the code in commit
b40f6327bb19b6, the g++ compiler
most likely complained with an error like this:
error: ‘struct ost_id::<anonymous union>::ostid’ invalid; an
anonymous union can only have non-static data members [-fpermissive]
The fix from
b40f6327bb19b6 conditionally eliminated the anonymous
union when a C++ compiler is being used. That means that the API
varies depending on your choice of compiler, which is not at all
desirable.
The better fix is to address the static data member that the error
complained about. This patch changes the code to use an unnamed
struct in place of "struct ostid" inside of the anonymous union.
That name declaration was completely unnecessary anyway, since it
was not used anywhere else.
Change-Id: I59f8341f5f9833d8a144cf2feaa178cb76e643dc
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/10176
Reviewed-by: Robert Read <robert.read@intel.com>
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>