summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2009-07-21 12:28:01 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2009-07-21 12:28:01 (GMT)
commitba191b0a26b966ad1fb596a905307399922bc44a (patch)
treed4bbbf39a89e1382e58fe1eb5eacb4cfb7f75d56
parent8714892977269591bb9b348c6eb549a7f2c45cbc (diff)
downloadQt-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.
-rw-r--r--src/corelib/tools/qstringmatcher.h11
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;
};
};