From eda8af2a699da594644517f9ff5d5cf38fa039d3 Mon Sep 17 00:00:00 2001 From: hjk Date: Mon, 29 Sep 2014 15:50:30 +0200 Subject: Make QAccessible compile with -Werror GCC was bailing out when attempting to merge this into the dev branch due to the use of "potentially uninitialized values". Change-Id: Id2fc4a123a4b180b9ab439429a0d20245c7ee41b Reviewed-by: Thiago Macieira --- src/gui/accessible/qaccessible.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index d3afed604f..f85b6d1aad 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -1991,6 +1991,8 @@ QString QAccessibleTextInterface::textBeforeOffset(int offset, QAccessible::Text case QAccessible::NoBoundary: // return empty, this function currently only supports single lines, so there can be no line before return QString(); + default: + Q_UNREACHABLE(); } // keep behavior in sync with QTextCursor::movePosition()! @@ -2063,6 +2065,8 @@ QString QAccessibleTextInterface::textAfterOffset(int offset, QAccessible::TextB case QAccessible::NoBoundary: // return empty, this function currently only supports single lines, so there can be no line after return QString(); + default: + Q_UNREACHABLE(); } // keep behavior in sync with QTextCursor::movePosition()! @@ -2150,6 +2154,8 @@ QString QAccessibleTextInterface::textAtOffset(int offset, QAccessible::TextBoun *startOffset = 0; *endOffset = txt.length(); return txt; + default: + Q_UNREACHABLE(); } // keep behavior in sync with QTextCursor::movePosition()! -- cgit v1.2.3