Fix warnings building with --std=c++11 and gcc 8
Silence warnings about signed constants being shifted out of int range. Change-Id: I5dc397de71f4de09e54ce3cbc0f8e3a1cf977b03 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
e9c08f8287
commit
a227ea5bd5
@ -96,7 +96,7 @@ class Q_CORE_EXPORT QDebug
|
||||
void setVerbosity(int v)
|
||||
{
|
||||
if (context.version > 1) {
|
||||
flags &= ~(VerbosityMask << VerbosityShift);
|
||||
flags &= ~(uint(VerbosityMask) << VerbosityShift);
|
||||
flags |= (v & VerbosityMask) << VerbosityShift;
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ class QGLDefaultOverlayFormat: public QGLFormat
|
||||
public:
|
||||
inline QGLDefaultOverlayFormat()
|
||||
{
|
||||
setOption(QGL::FormatOption(0xffff << 16)); // turn off all options
|
||||
setOption(QGL::FormatOption(0xffffU << 16)); // turn off all options
|
||||
setOption(QGL::DirectRendering);
|
||||
setPlane(1);
|
||||
}
|
||||
|
@ -591,7 +591,7 @@ static void convertRGBToARGB_helper(const uchar *src, uint *dst, int width, int
|
||||
uchar green = src[x + 1];
|
||||
uchar blue = src[x + 1 + offs];
|
||||
LcdFilter::filterPixel(red, green, blue);
|
||||
*dd++ = (0xFF << 24) | (red << 16) | (green << 8) | blue;
|
||||
*dd++ = (0xFFU << 24) | (red << 16) | (green << 8) | blue;
|
||||
}
|
||||
dst += width;
|
||||
src += src_pitch;
|
||||
@ -616,7 +616,7 @@ static void convertRGBToARGB_V_helper(const uchar *src, uint *dst, int width, in
|
||||
uchar green = src[x + src_pitch];
|
||||
uchar blue = src[x + src_pitch + offs];
|
||||
LcdFilter::filterPixel(red, green, blue);
|
||||
*dst++ = (0XFF << 24) | (red << 16) | (green << 8) | blue;
|
||||
*dst++ = (0XFFU << 24) | (red << 16) | (green << 8) | blue;
|
||||
}
|
||||
src += 3*src_pitch;
|
||||
}
|
||||
@ -637,7 +637,7 @@ static inline void convertGRAYToARGB(const uchar *src, uint *dst, int width, int
|
||||
const uchar * const e = p + width;
|
||||
while (p < e) {
|
||||
uchar gray = *p++;
|
||||
*dst++ = (0xFF << 24) | (gray << 16) | (gray << 8) | gray;
|
||||
*dst++ = (0xFFU << 24) | (gray << 16) | (gray << 8) | gray;
|
||||
}
|
||||
src += src_pitch;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user