diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-05-04 19:00:57 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-06-26 13:30:12 (GMT) |
commit | 4def9f12bec58e6c952361aac946fca80c27a3be (patch) | |
tree | 0f6dc4a1d9d8db8700f3369d35e65c4b3647337c /src/corelib/tools/qdatetime.cpp | |
parent | b798c301d34f0f1ec69ca533bc91e575fac9843b (diff) | |
download | Qt-4def9f12bec58e6c952361aac946fca80c27a3be.zip Qt-4def9f12bec58e6c952361aac946fca80c27a3be.tar.gz Qt-4def9f12bec58e6c952361aac946fca80c27a3be.tar.bz2 |
Fixed a gcc 4.4 warning on switching a value outside the enum.
These four enum values are used in variables of type Section, but aren't in it.
With gcc 4.4, it displays a warning that the value is lower than the lowest value
Diffstat (limited to 'src/corelib/tools/qdatetime.cpp')
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 09cc47f..7dd9060 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -4398,6 +4398,13 @@ int QDateTimeParser::sectionMaxSize(Section s, int count) const case DateSectionMask: qWarning("QDateTimeParser::sectionMaxSize: Invalid section %s", sectionName(s).toLatin1().constData()); + + case NoSectionIndex: + case FirstSectionIndex: + case LastSectionIndex: + case CalendarPopupIndex: + // these cases can't happen + break; } return -1; } |