Fix warnings found by GCC 4.8 in qtmultimedia
authorThiago Macieira <thiago.macieira@intel.com>
Sat, 6 Apr 2013 20:57:18 +0000 (13:57 -0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 11 Apr 2013 18:51:57 +0000 (20:51 +0200)
qgstreamermessage.cpp:48:12: warning: ‘wuchi’ defined but not used [-Wunused-variable]
qvideosurfacegstsink.cpp:383:1: warning: narrowing conversion of ‘4278190080u’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing]

Change-Id: I678e9eb39f3963e20109bb15c9c0c0d118b5a3b2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
src/gsttools/qgstreamermessage.cpp
src/gsttools/qvideosurfacegstsink.cpp

index fd6bde9..89ecf0b 100644 (file)
@@ -56,6 +56,7 @@ static int wuchi = qRegisterMetaType<QGstreamerMessage>();
 QGstreamerMessage::QGstreamerMessage():
     m_message(0)
 {
+    Q_UNUSED(wuchi);
 }
 
 QGstreamerMessage::QGstreamerMessage(GstMessage* message):
index c41f8d7..94aa126 100644 (file)
@@ -371,12 +371,12 @@ struct RgbFormat
 
 static const RgbFormat qt_rgbColorLookup[] =
 {
-    { QVideoFrame::Format_RGB32 , 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 },
+    { QVideoFrame::Format_RGB32 , 32, 24, 4321, 0x0000FF00, 0x00FF0000, int(0xFF000000), 0x00000000 },
     { QVideoFrame::Format_RGB32 , 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
-    { QVideoFrame::Format_BGR32 , 32, 24, 4321, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 },
+    { QVideoFrame::Format_BGR32 , 32, 24, 4321, int(0xFF000000), 0x00FF0000, 0x0000FF00, 0x00000000 },
     { QVideoFrame::Format_BGR32 , 32, 24, 1234, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
-    { QVideoFrame::Format_ARGB32, 32, 24, 4321, 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF },
-    { QVideoFrame::Format_ARGB32, 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
+    { QVideoFrame::Format_ARGB32, 32, 24, 4321, 0x0000FF00, 0x00FF0000, int(0xFF000000), 0x000000FF },
+    { QVideoFrame::Format_ARGB32, 32, 24, 1234, 0x00FF0000, 0x0000FF00, 0x000000FF, int(0xFF000000) },
     { QVideoFrame::Format_RGB24 , 24, 24, 4321, 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
     { QVideoFrame::Format_BGR24 , 24, 24, 4321, 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 },
     { QVideoFrame::Format_RGB565, 16, 16, 1234, 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }