[vlmc-devel] commit: Build: Adding -W -Wall parameters, and fixing a first batch of warnings. ( Hugo Beauzée-Luyssen )
git at videolan.org
git at videolan.org
Fri May 14 18:51:27 CEST 2010
vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Fri May 14 15:48:55 2010 +0200| [2af9a679a7615a838e78cab3a311a3de7de01cca] | committer: Hugo Beauzée-Luyssen
Build: Adding -W -Wall parameters, and fixing a first batch of warnings.
> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=2af9a679a7615a838e78cab3a311a3de7de01cca
---
src/CMakeLists.txt | 2 ++
src/Commands/Commands.cpp | 4 ++--
src/LibVLCpp/VLCMedia.cpp | 12 ++++++------
src/Media/Clip.cpp | 4 ++--
src/Renderer/WorkflowRenderer.cpp | 10 +++++-----
src/Renderer/WorkflowRenderer.h | 2 +-
src/Settings/SettingsManager.cpp | 2 +-
src/Settings/SettingsManager.h | 2 +-
8 files changed, 20 insertions(+), 18 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index bd3601a..1783560 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -322,6 +322,8 @@ ADD_CUSTOM_COMMAND(
DEPENDS ${CMAKE_BINARY_DIR}/src/vlmc
)
+ADD_DEFINITIONS( -W -Wall )
+
IF(UNIX)
IF (WITH_PROFILING)
ADD_DEFINITIONS( -pg )
diff --git a/src/Commands/Commands.cpp b/src/Commands/Commands.cpp
index 190e50d..fe0bbbe 100644
--- a/src/Commands/Commands.cpp
+++ b/src/Commands/Commands.cpp
@@ -49,8 +49,8 @@ Commands::MainWorkflow::AddClip::AddClip( ClipHelper* ch,
m_trackNumber( trackNumber ),
m_pos( pos ),
m_trackType( trackType ),
- m_undoRedoAction( undoRedoAction ),
- m_clipHelper( ch )
+ m_clipHelper( ch ),
+ m_undoRedoAction( undoRedoAction )
{
setText( QObject::tr( "Adding clip to track %1" ).arg( QString::number( trackNumber ) ) );
}
diff --git a/src/LibVLCpp/VLCMedia.cpp b/src/LibVLCpp/VLCMedia.cpp
index e7c0acf..1d0249f 100644
--- a/src/LibVLCpp/VLCMedia.cpp
+++ b/src/LibVLCpp/VLCMedia.cpp
@@ -50,28 +50,28 @@ void Media::addOption( const char* opt )
void Media::setVideoLockCallback( void* callback )
{
char param[64];
- sprintf( param, ":sout-smem-video-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
+ sprintf( param, ":sout-smem-video-prerender-callback=%"PRId64, (intptr_t)callback );
addOption(param);
}
void Media::setVideoUnlockCallback( void* callback )
{
char param[64];
- sprintf( param, ":sout-smem-video-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
+ sprintf( param, ":sout-smem-video-postrender-callback=%"PRId64, (intptr_t)callback );
addOption( param );
}
void Media::setAudioLockCallback( void* callback )
{
char param[64];
- sprintf( param, ":sout-smem-audio-prerender-callback=%"PRId64, (qint64)(intptr_t)callback );
+ sprintf( param, ":sout-smem-audio-prerender-callback=%"PRId64, (intptr_t)callback );
addOption(param);
}
void Media::setAudioUnlockCallback( void* callback )
{
char param[64];
- sprintf( param, ":sout-smem-audio-postrender-callback=%"PRId64, (qint64)(intptr_t)callback );
+ sprintf( param, ":sout-smem-audio-postrender-callback=%"PRId64, (intptr_t)callback );
addOption( param );
}
@@ -79,7 +79,7 @@ void Media::setVideoDataCtx( void* dataCtx )
{
char param[64];
- sprintf( param, ":sout-smem-video-data=%"PRId64, (qint64)(intptr_t)dataCtx );
+ sprintf( param, ":sout-smem-video-data=%"PRId64, (intptr_t)dataCtx );
addOption( param );
}
@@ -87,7 +87,7 @@ void Media::setAudioDataCtx( void* dataCtx )
{
char param[64];
- sprintf( param, ":sout-smem-audio-data=%"PRId64, (qint64)(intptr_t)dataCtx );
+ sprintf( param, ":sout-smem-audio-data=%"PRId64, (intptr_t)dataCtx );
addOption( param );
}
diff --git a/src/Media/Clip.cpp b/src/Media/Clip.cpp
index 882d73a..44280a3 100644
--- a/src/Media/Clip.cpp
+++ b/src/Media/Clip.cpp
@@ -55,11 +55,11 @@ Clip::Clip( Media *media, qint64 begin /*= 0*/, qint64 end /*= -1*/, const QStri
Clip::Clip( Clip *parent, qint64 begin /*= -1*/, qint64 end /*= -1*/,
const QString &uuid /*= QString()*/ ) :
- m_parent( parent ),
m_begin( begin ),
m_end( end ),
+ m_media( parent->getMedia() ),
m_rootClip( parent->rootClip() ),
- m_media( parent->getMedia() )
+ m_parent( parent )
{
if ( begin < 0 )
m_begin = parent->m_begin;
diff --git a/src/Renderer/WorkflowRenderer.cpp b/src/Renderer/WorkflowRenderer.cpp
index 5e8a4ab..e6c6de5 100644
--- a/src/Renderer/WorkflowRenderer.cpp
+++ b/src/Renderer/WorkflowRenderer.cpp
@@ -43,11 +43,11 @@ WorkflowRenderer::WorkflowRenderer() :
m_stopping( false ),
m_outputFps( 0.0f ),
m_esHandler( NULL ),
- m_oldLength( 0 ),
m_media( NULL ),
m_width( 0 ),
m_height( 0 ),
- m_silencedAudioBuffer( NULL )
+ m_silencedAudioBuffer( NULL ),
+ m_oldLength( 0 )
{
}
@@ -102,11 +102,11 @@ WorkflowRenderer::setupRenderer( quint32 width, quint32 height, double fps )
m_media = new LibVLCpp::Media( "imem://" + QString( videoString ) );
m_media->addOption( inputSlave );
- sprintf( buffer, "imem-get=%"PRId64, (qint64)getLockCallback() );
+ sprintf( buffer, "imem-get=%"PRId64, (intptr_t)getLockCallback() );
m_media->addOption( buffer );
- sprintf( buffer, ":imem-release=%"PRId64, (qint64)getUnlockCallback() );
+ sprintf( buffer, ":imem-release=%"PRId64, (intptr_t)getUnlockCallback() );
m_media->addOption( buffer );
- sprintf( buffer, ":imem-data=%"PRId64, (qint64)m_esHandler );
+ sprintf( buffer, ":imem-data=%"PRId64, (intptr_t)m_esHandler );
m_media->addOption( buffer );
m_media->addOption( ":text-renderer dummy" );
}
diff --git a/src/Renderer/WorkflowRenderer.h b/src/Renderer/WorkflowRenderer.h
index f2b1f32..070b443 100644
--- a/src/Renderer/WorkflowRenderer.h
+++ b/src/Renderer/WorkflowRenderer.h
@@ -268,7 +268,7 @@ class WorkflowRenderer : public GenericRenderer
quint32 m_nbChannels;
quint32 m_rate;
/**
- * \brief Used in permanent rendering mode, to know is some operations
+ * \brief Used in permanent rendering mode, to know if some operations
* has to be performed.
*/
qint64 m_oldLength;
diff --git a/src/Settings/SettingsManager.cpp b/src/Settings/SettingsManager.cpp
index 51f3727..1459476 100644
--- a/src/Settings/SettingsManager.cpp
+++ b/src/Settings/SettingsManager.cpp
@@ -218,7 +218,7 @@ SettingsManager::load( const QDomElement &root )
return true;
}
-bool
+void
SettingsManager::commit( SettingsManager::Type type )
{
{
diff --git a/src/Settings/SettingsManager.h b/src/Settings/SettingsManager.h
index b07c92e..db28fdd 100644
--- a/src/Settings/SettingsManager.h
+++ b/src/Settings/SettingsManager.h
@@ -117,7 +117,7 @@ class SettingsManager : public QObject, public Singleton<SettingsManager>
void save( QXmlStreamWriter& project ) const;
bool load( const QDomElement &element );
- bool commit( SettingsManager::Type type );
+ void commit( SettingsManager::Type type );
void flush();
private:
More information about the Vlmc-devel
mailing list