Commit 2af9a679 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Build: Adding -W -Wall parameters, and fixing a first batch of warnings.

parent 530f6a69
......@@ -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 )
......
......@@ -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 ) ) );
}
......
......@@ -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 );
}
......
......@@ -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;
......
......@@ -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" );
}
......
......@@ -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;
......
......@@ -218,7 +218,7 @@ SettingsManager::load( const QDomElement &root )
return true;
}
bool
void
SettingsManager::commit( SettingsManager::Type type )
{
{
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment