QFontEngineFT: Fix Clang warning about using uninitialized variables.

gui/text/qfontengine_ft.cpp(1743,5) :  warning: variable 'bytesPerLine' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
gui/text/qfontengine_ft.cpp(1743,5) :  warning: variable 'format' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]

The default branch is marked Q_UNREACHABLE, but apparently Clang does
not recognize it.

Task-number: QTBUG-50804
Change-Id: Idfce8cb2b9a481dd67a18d9952b920ad4f71e0f4
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Friedemann Kleint 2016-02-03 16:10:33 +01:00 committed by Konstantin Ritt
parent 41706400f6
commit 8ce7441892

View File

@ -1719,8 +1719,8 @@ static inline QImage alphaMapFromGlyphData(QFontEngineFT::Glyph *glyph, QFontEng
if (glyph == Q_NULLPTR)
return QImage();
QImage::Format format;
int bytesPerLine;
QImage::Format format = QImage::Format_Invalid;
int bytesPerLine = -1;
switch (glyphFormat) {
case QFontEngine::Format_Mono:
format = QImage::Format_Mono;