提交 d6099af2 编写于 作者: C Christopher J. Morrone 提交者: Greg Kroah-Hartman

staging: lustre: Remove static declaration in anonymous union

It is not permitted in C++ to have a static declaration inside
of an anonymous union. The g++ compiler will complaine with an
error like this:

 error: struct ost_id::<anonymous union>::ostid invalid; an
 anonymous union can only have non-static data members [-fpermissive]

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.
Signed-off-by: NChristopher J. Morrone <morrone2@llnl.gov>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4987
Reviewed-on: http://review.whamcloud.com/10176Reviewed-by: NRobert Read <robert.read@intel.com>
Reviewed-by: NAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: NJames Simmons <jsimmons@infradead.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 c948390f
...@@ -167,7 +167,7 @@ struct lustre_mdt_attrs { ...@@ -167,7 +167,7 @@ struct lustre_mdt_attrs {
*/ */
struct ost_id { struct ost_id {
union { union {
struct ostid { struct {
__u64 oi_id; __u64 oi_id;
__u64 oi_seq; __u64 oi_seq;
} oi; } oi;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册