diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-21 12:28:01 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-21 12:28:01 (GMT) |
commit | ba191b0a26b966ad1fb596a905307399922bc44a (patch) | |
tree | d4bbbf39a89e1382e58fe1eb5eacb4cfb7f75d56 /src/corelib/tools | |
parent | 8714892977269591bb9b348c6eb549a7f2c45cbc (diff) | |
download | Qt-ba191b0a26b966ad1fb596a905307399922bc44a.zip Qt-ba191b0a26b966ad1fb596a905307399922bc44a.tar.gz Qt-ba191b0a26b966ad1fb596a905307399922bc44a.tar.bz2 |
Fix warning with Sun CC 5.9 and xlC 7: no new types inside anonymous unions.
These compilers compile this code fine, but this warning shows up
*everywhere* when building Qt (or used to, since qstringlist.h
included qstringmatcher.h).
Move the structure definition to outside the union.
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qstringmatcher.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/corelib/tools/qstringmatcher.h b/src/corelib/tools/qstringmatcher.h index 2b8edc9..61b7a95 100644 --- a/src/corelib/tools/qstringmatcher.h +++ b/src/corelib/tools/qstringmatcher.h @@ -81,13 +81,14 @@ private: // explicitely allow anonymous unions for RVCT to prevent compiler warnings #pragma anon_unions #endif + struct Data { + uchar q_skiptable[256]; + const QChar *uc; + int len; + }; union { uint q_data[256]; - struct { - uchar q_skiptable[256]; - const QChar *uc; - int len; - } p; + Data p; }; }; |