Closes issue888: fix compiler warnings for using a gnu-extension (

anonymous structs ).
pull/907/head
Kim Kulling 2016-06-05 21:06:05 +02:00
parent 814d2e7821
commit 398595225e
6 changed files with 21 additions and 76 deletions

View File

@ -86,12 +86,7 @@ public:
public: public:
// Red, green, blue and alpha color values // Red, green, blue and alpha color values
union {
struct {
TReal r, g, b, a; TReal r, g, b, a;
};
TReal c[ 4 ];
};
} PACK_STRUCT; // !struct aiColor4D } PACK_STRUCT; // !struct aiColor4D
typedef aiColor4t<float> aiColor4D; typedef aiColor4t<float> aiColor4D;
@ -99,12 +94,7 @@ typedef aiColor4t<float> aiColor4D;
#else #else
struct aiColor4D { struct aiColor4D {
union {
struct {
float r, g, b, a; float r, g, b, a;
};
float c[ 4 ];
};
} PACK_STRUCT; } PACK_STRUCT;
#endif // __cplusplus #endif // __cplusplus

View File

@ -160,16 +160,9 @@ public:
const aiVector3t<TReal>& to, aiMatrix3x3t& out); const aiVector3t<TReal>& to, aiMatrix3x3t& out);
public: public:
union {
struct {
TReal a1, a2, a3; TReal a1, a2, a3;
TReal b1, b2, b3; TReal b1, b2, b3;
TReal c1, c2, c3; TReal c1, c2, c3;
};
TReal m[ 3 ][ 3 ];
TReal mData[ 9 ];
};
} PACK_STRUCT; } PACK_STRUCT;
typedef aiMatrix3x3t<float> aiMatrix3x3; typedef aiMatrix3x3t<float> aiMatrix3x3;
@ -177,15 +170,9 @@ typedef aiMatrix3x3t<float> aiMatrix3x3;
#else #else
struct aiMatrix3x3 { struct aiMatrix3x3 {
union {
struct {
float a1, a2, a3; float a1, a2, a3;
float b1, b2, b3; float b1, b2, b3;
float c1, c2, c3; float c1, c2, c3;
};
float m[ 3 ][ 3 ];
float mData[ 9 ];
};
} PACK_STRUCT; } PACK_STRUCT;
#endif // __cplusplus #endif // __cplusplus

View File

@ -222,16 +222,10 @@ public:
const aiVector3t<TReal>& to, aiMatrix4x4t& out); const aiVector3t<TReal>& to, aiMatrix4x4t& out);
public: public:
union {
struct {
TReal a1, a2, a3, a4; TReal a1, a2, a3, a4;
TReal b1, b2, b3, b4; TReal b1, b2, b3, b4;
TReal c1, c2, c3, c4; TReal c1, c2, c3, c4;
TReal d1, d2, d3, d4; TReal d1, d2, d3, d4;
};
TReal m[ 4 ][ 4 ];
TReal mData[ 16 ];
};
} PACK_STRUCT; } PACK_STRUCT;
typedef aiMatrix4x4t<float> aiMatrix4x4; typedef aiMatrix4x4t<float> aiMatrix4x4;
@ -239,16 +233,10 @@ typedef aiMatrix4x4t<float> aiMatrix4x4;
#else #else
struct aiMatrix4x4 { struct aiMatrix4x4 {
union {
struct {
float a1, a2, a3, a4; float a1, a2, a3, a4;
float b1, b2, b3, b4; float b1, b2, b3, b4;
float c1, c2, c3, c4; float c1, c2, c3, c4;
float d1, d2, d3, d4; float d1, d2, d3, d4;
};
float m[ 4 ][ 4 ];
float mData[ 16 ];
};
} PACK_STRUCT; } PACK_STRUCT;

View File

@ -95,13 +95,7 @@ public:
template <typename TOther> template <typename TOther>
operator aiVector2t<TOther> () const; operator aiVector2t<TOther> () const;
union {
struct {
TReal x, y; TReal x, y;
};
TReal v[ 2 ];
};
} PACK_STRUCT; } PACK_STRUCT;
typedef aiVector2t<float> aiVector2D; typedef aiVector2t<float> aiVector2D;
@ -109,12 +103,7 @@ typedef aiVector2t<float> aiVector2D;
#else #else
struct aiVector2D { struct aiVector2D {
union {
struct {
float x, y; float x, y;
};
float v[ 2 ];
};
}; };
#endif // __cplusplus #endif // __cplusplus

View File

@ -125,12 +125,7 @@ public:
* @param o Second factor */ * @param o Second factor */
const aiVector3t SymMul(const aiVector3t& o); const aiVector3t SymMul(const aiVector3t& o);
union {
struct {
TReal x, y, z; TReal x, y, z;
};
TReal v[ 3 ];
};
} PACK_STRUCT; } PACK_STRUCT;
@ -139,12 +134,7 @@ typedef aiVector3t<float> aiVector3D;
#else #else
struct aiVector3D { struct aiVector3D {
union {
struct {
float x, y, z; float x, y, z;
};
float v[ 3 ];
};
} PACK_STRUCT; } PACK_STRUCT;
#endif // __cplusplus #endif // __cplusplus

View File

@ -58,6 +58,7 @@ import os
import subprocess import subprocess
import zipfile import zipfile
import collections import collections
import multiprocessing
import settings import settings
import utils import utils