Commit a111119d authored by Erwan Tulou's avatar Erwan Tulou

skins2: kill many compil warnings

parent 4423fd4b
......@@ -36,7 +36,7 @@ public:
void (VlcProc::*func)(vlc_object_t *,vlc_value_t),
string label )
: CmdGeneric( pIntf ), m_pObj( pObj ), m_newVal( newVal ),
m_pfExecute( func ), m_label( label )
m_label( label ), m_pfExecute( func )
{
if( m_pObj )
vlc_object_hold( m_pObj );
......
......@@ -161,6 +161,7 @@ void CtrlButton::setImage( AnimBitmap *pImg )
void CtrlButton::onUpdate( Subject<AnimBitmap> &rBitmap, void *arg )
{
(void)rBitmap;(void)arg;
notifyLayout( m_pImg->getWidth(), m_pImg->getHeight() );
}
......
......@@ -246,12 +246,14 @@ void CtrlCheckbox::CmdHiddenUp::execute()
void CtrlCheckbox::onVarBoolUpdate( VarBool &rVariable )
{
(void)rVariable;
changeButton();
}
void CtrlCheckbox::onUpdate( Subject<AnimBitmap> &rBitmap, void *arg )
{
(void)rBitmap;(void)arg;
notifyLayout( m_pImgCurrent->getWidth(), m_pImgCurrent->getHeight() );
}
......
......@@ -164,6 +164,7 @@ bool CtrlGeneric::isVisible() const
void CtrlGeneric::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)arg;
// Is it the visibility variable ?
if( &rVariable == m_pVisible )
{
......
......@@ -47,13 +47,15 @@ public:
virtual ~CtrlGeneric();
/// Handle an event on the control
virtual void handleEvent( EvtGeneric &rEvent ) { }
virtual void handleEvent( EvtGeneric &rEvent ) { (void)rEvent; }
/// Check whether coordinates are inside the control
virtual bool mouseOver( int x, int y ) const { return false; }
virtual bool mouseOver( int x, int y ) const
{ (void)x; (void)y; return false; }
/// Draw the control on the given graphics
virtual void draw( OSGraphics &rImage, int xDest, int yDest, int w, int h ) { }
virtual void draw( OSGraphics &rImage, int xDest,
int yDest, int w, int h ) = 0;
/// Set the position and the associated layout of the control
virtual void setLayout( GenericLayout *pLayout,
......@@ -124,7 +126,7 @@ protected:
virtual void onPositionChange() { }
/// Overload this method to get notified of bool variable changes
virtual void onVarBoolUpdate( VarBool &rVar ) { }
virtual void onVarBoolUpdate( VarBool &rVar ) { (void)rVar; }
/// Method called when an observed bool variable is changed
virtual void onUpdate( Subject<VarBool> &rVariable , void* );
......
......@@ -240,6 +240,7 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest, int w, int h )
void CtrlImage::onUpdate( Subject<VarString> &rVariable, void* arg )
{
(void)arg;
VlcProc *pVlcProc = VlcProc::instance( getIntf() );
if( &rVariable == &pVlcProc->getStreamArtVar() )
......
......@@ -68,6 +68,7 @@ CtrlList::~CtrlList()
void CtrlList::onUpdate( Subject<VarList> &rList, void *arg )
{
(void)rList; (void)arg;
autoScroll();
m_pLastSelected = NULL;
}
......@@ -75,6 +76,7 @@ void CtrlList::onUpdate( Subject<VarList> &rList, void *arg )
void CtrlList::onUpdate( Subject<VarPercent> &rPercent, void *arg )
{
(void)rPercent; (void)arg;
// Get the size of the control
const Position *pPos = getPosition();
if( !pPos )
......
......@@ -105,9 +105,9 @@ void CtrlRadialSlider::draw( OSGraphics &rImage, int xDest, int yDest, int w, in
}
void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable,
void *arg )
void CtrlRadialSlider::onUpdate( Subject<VarPercent> &rVariable, void *arg )
{
(void)arg;
if( &rVariable == &m_rVariable )
{
int position = (int)( m_rVariable.get() * ( m_numImg - 1 ) );
......
......@@ -205,9 +205,9 @@ void CtrlSliderCursor::notifyLayout( int width, int height, int xOffSet, int yOf
}
void CtrlSliderCursor::onUpdate( Subject<VarPercent> &rVariable,
void *arg )
void CtrlSliderCursor::onUpdate( Subject<VarPercent> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
// The position has changed
refreshLayout( false );
}
......@@ -518,6 +518,7 @@ void CtrlSliderBg::associateCursor( CtrlSliderCursor &rCursor )
void CtrlSliderBg::onUpdate( Subject<VarPercent> &rVariable, void*arg )
{
(void)rVariable; (void)arg;
int position = (int)( m_rVariable.get() * (m_nbHoriz * m_nbVert - 1) );
if( position == m_position )
return;
......
......@@ -215,6 +215,7 @@ void CtrlText::setText( const UString &rText, uint32_t color )
void CtrlText::onUpdate( Subject<VarText> &rVariable, void* arg )
{
(void)rVariable; (void)arg;
if( isVisible() )
{
displayText( m_rVariable.get() );
......@@ -225,6 +226,7 @@ void CtrlText::onUpdate( Subject<VarText> &rVariable, void* arg )
void CtrlText::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)arg;
// Visibility changed
if( &rVariable == m_pVisible )
{
......
......@@ -59,10 +59,10 @@ CtrlTree::CtrlTree( intf_thread_t *pIntf,
CtrlGeneric( pIntf,rHelp, pVisible), m_rTree( rTree), m_rFont( rFont ),
m_pBgBitmap( pBgBitmap ), m_pItemBitmap( pItemBitmap ),
m_pOpenBitmap( pOpenBitmap ), m_pClosedBitmap( pClosedBitmap ),
m_pScaledBitmap( NULL ),
m_fgColor( fgColor ), m_playColor( playColor ), m_bgColor1( bgColor1 ),
m_bgColor2( bgColor2 ), m_selColor( selColor ),
m_pLastSelected( NULL ), m_pImage( NULL ), m_pScaledBitmap( NULL ),
m_dontMove( false )
m_pLastSelected( NULL ), m_pImage( NULL ), m_dontMove( false )
{
// Observe the tree and position variables
m_rTree.addObserver( this );
......@@ -140,6 +140,7 @@ int CtrlTree::maxItems()
void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
tree_update *arg )
{
(void)rTree;
if( arg->type == arg->UpdateItem ) // Item update
{
if( arg->b_active_item )
......@@ -196,6 +197,7 @@ void CtrlTree::onUpdate( Subject<VarTree, tree_update> &rTree,
void CtrlTree::onUpdate( Subject<VarPercent> &rPercent, void* arg)
{
(void)rPercent; (void)arg;
// Determine what is the first item to display
VarTree::Iterator it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();
......@@ -712,7 +714,6 @@ bool CtrlTree::ensureVisible( VarTree::Iterator item )
void CtrlTree::autoScroll()
{
// Find the current playing stream
int playIndex = 0;
VarTree::Iterator it;
for( it = m_flat ? m_rTree.firstLeaf() : m_rTree.begin();
......
......@@ -57,11 +57,13 @@ CtrlVideo::~CtrlVideo()
void CtrlVideo::handleEvent( EvtGeneric &rEvent )
{
(void)rEvent;
}
bool CtrlVideo::mouseOver( int x, int y ) const
{
(void)x; (void)y;
return false;
}
......@@ -161,6 +163,8 @@ void CtrlVideo::resizeControl( int width, int height )
void CtrlVideo::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)arg;
// Visibility changed
if( &rVariable == m_pVisible )
{
......
......@@ -1193,7 +1193,7 @@ string Builder::getFilePath( const string &rFileName ) const
// For skins to be valid on both Linux and Win32,
// slash should be used as path separator for both OSs.
msg_Warn( getIntf(), "use of '/' is preferred to '\\' for paths" );
int pos;
string::size_type pos;
while( ( pos = file.find( "\\" ) ) != string::npos )
file[pos] = '/';
}
......
......@@ -507,6 +507,7 @@ VarBool *Interpreter::getVarBool( const string &rName, Theme *pTheme )
VarPercent *Interpreter::getVarPercent( const string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
return static_cast<VarPercent*>(pVarManager->getVar( rName, "percent" ));
}
......@@ -514,6 +515,7 @@ VarPercent *Interpreter::getVarPercent( const string &rName, Theme *pTheme )
VarList *Interpreter::getVarList( const string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
return static_cast<VarList*>(pVarManager->getVar( rName, "list" ));
}
......@@ -521,6 +523,7 @@ VarList *Interpreter::getVarList( const string &rName, Theme *pTheme )
VarTree *Interpreter::getVarTree( const string &rName, Theme *pTheme )
{
(void)pTheme;
VarManager *pVarManager = VarManager::instance( getIntf() );
return static_cast<VarTree*>(pVarManager->getVar( rName, "tree" ));
}
......
......@@ -871,7 +871,7 @@ const string SkinParser::uniqueId( const string &id )
return newId;
}
const int SkinParser::getRefWidth( bool toScreen )
int SkinParser::getRefWidth( bool toScreen )
{
if( toScreen )
{
......@@ -892,7 +892,7 @@ const int SkinParser::getRefWidth( bool toScreen )
}
}
const int SkinParser::getRefHeight( bool toScreen )
int SkinParser::getRefHeight( bool toScreen )
{
if( toScreen )
{
......@@ -914,11 +914,11 @@ const int SkinParser::getRefHeight( bool toScreen )
}
const int SkinParser::getDimension( string value, int refDimension )
int SkinParser::getDimension( string value, int refDimension )
{
int val;
string::size_type leftPos;
int leftPos = value.find( "%" );
leftPos = value.find( "%" );
if( leftPos != string::npos )
{
int val = atoi( value.substr( 0, leftPos ).c_str() );
......@@ -936,7 +936,7 @@ const int SkinParser::getDimension( string value, int refDimension )
}
const int SkinParser::getPosition( string position )
int SkinParser::getPosition( string position )
{
if( position == "-1" )
return POS_UNDEF;
......
......@@ -98,10 +98,10 @@ private:
const string uniqueId( const string &id );
/// Management of relative positions
const int getRefWidth( bool toScreen );
const int getRefHeight( bool toScreen );
const int getDimension( string value, int refDimension );
const int getPosition( string value );
int getRefWidth( bool toScreen );
int getRefHeight( bool toScreen );
int getDimension( string value, int refDimension );
int getPosition( string value );
void updateWindowPos( int width, int height );
void convertPosition( string position,
......
......@@ -59,9 +59,9 @@ protected:
bool m_errors;
/// Callbacks
virtual void handleBeginElement( const string &rName,
AttrList_t &attr ) { }
virtual void handleEndElement( const string &rName ) { }
virtual void handleBeginElement( const string &rName, AttrList_t &attr )
{ (void)rName; (void)attr; }
virtual void handleEndElement( const string &rName ) { (void)rName; }
private:
void LoadCatalog();
......
......@@ -29,8 +29,8 @@
AnimBitmap::AnimBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap ):
SkinObject( pIntf ), m_pImage( NULL ), m_curFrame( 0 ), m_curLoop( 0 ),
m_pTimer( NULL ), m_cmdNextFrame( this ), m_rBitmap( rBitmap )
SkinObject( pIntf ), m_rBitmap( rBitmap ), m_pImage( NULL ),
m_curFrame( 0 ), m_curLoop( 0 ), m_pTimer( NULL ), m_cmdNextFrame( this )
{
// Build the graphics
OSFactory *pOsFactory = OSFactory::instance( pIntf );
......
......@@ -82,6 +82,8 @@ BitmapFont::BitmapFont( intf_thread_t *pIntf, const GenericBitmap &rBitmap,
GenericBitmap *BitmapFont::drawString( const UString &rString,
uint32_t color, int maxWidth ) const
{
(void)color; (void)maxWidth;
uint32_t *pString = (uint32_t*)rString.u_str();
// Compute the text width
int width = 0;
......
......@@ -96,6 +96,8 @@ void Dialogs::showPlaylistSaveCB( intf_dialog_args_t *pArg )
static int PopupMenuCB( vlc_object_t *p_this, const char *psz_variable,
vlc_value_t old_val, vlc_value_t new_val, void *param )
{
(void)p_this; (void)psz_variable; (void)old_val;
Dialogs *p_dialogs = (Dialogs *)param;
p_dialogs->showPopupMenu( new_val.b_bool != 0, INTF_DIALOG_POPUPMENU );
......
......@@ -37,10 +37,11 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
GenericBitmap( pIntf, nbFrames, fps, nbLoops ), m_width( 0 ), m_height( 0 ),
m_pData( NULL )
{
video_format_t fmt_in = {0}, fmt_out = {0};
video_format_t fmt_in, fmt_out;
picture_t *pPic;
fmt_out.i_chroma = VLC_CODEC_RGBA;
video_format_Init( &fmt_in, 0 );
video_format_Init( &fmt_out, VLC_CODEC_RGBA );
char* psz_uri = make_URI( fileName.c_str(), NULL );
pPic = image_ReadUrl( pImageHandler, psz_uri, &fmt_in, &fmt_out );
......
......@@ -44,9 +44,11 @@ FscWindow::FscWindow( intf_thread_t *pIntf, int left, int top,
WindowManager &rWindowManager,
bool dragDrop, bool playOnDrop, bool visible ) :
TopWindow( pIntf, left, top, rWindowManager, dragDrop,
playOnDrop, false, GenericWindow::FscWindow ), m_cmdFscHide( this ),
m_opacity( m_opacity ), m_count( 0 )
playOnDrop, false, GenericWindow::FscWindow ),
m_pTimer( NULL ), m_count( 0 ), m_opacity( m_opacity ),
m_cmdFscHide( this )
{
(void)visible;
m_pTimer = OSFactory::instance( getIntf() )->createOSTimer( m_cmdFscHide );
VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
......
......@@ -132,8 +132,9 @@ void GenericWindow::toggleOnTop( bool onTop ) const
}
void GenericWindow::onUpdate( Subject<VarBool> &rVariable, void*arg )
void GenericWindow::onUpdate( Subject<VarBool> &rVariable, void* arg )
{
(void)rVariable; (void)arg;
if (&rVariable == m_pVarVisible )
{
if( m_pVarVisible->get() )
......
......@@ -65,13 +65,13 @@ public:
virtual ~GenericWindow();
/// Methods to process OS events.
virtual void processEvent( EvtFocus &rEvtFocus ) { }
virtual void processEvent( EvtMenu &rEvtMenu ) { }
virtual void processEvent( EvtMotion &rEvtMotion ) { }
virtual void processEvent( EvtMouse &rEvtMouse ) { }
virtual void processEvent( EvtLeave &rEvtLeave ) { }
virtual void processEvent( EvtKey &rEvtKey ) { }
virtual void processEvent( EvtScroll &rEvtScroll ) { }
virtual void processEvent( EvtFocus &rEvtFocus ) { (void)rEvtFocus; }
virtual void processEvent( EvtMenu &rEvtMenu ) { (void)rEvtMenu; }
virtual void processEvent( EvtMotion &rEvtMotion ) { (void)rEvtMotion; }
virtual void processEvent( EvtMouse &rEvtMouse ) { (void)rEvtMouse; }
virtual void processEvent( EvtLeave &rEvtLeave ) { (void)rEvtLeave; }
virtual void processEvent( EvtKey &rEvtKey ) { (void)rEvtKey; }
virtual void processEvent( EvtScroll &rEvtScroll ) { (void)rEvtScroll; }
virtual void processEvent( EvtRefresh &rEvtRefresh );
......@@ -79,7 +79,8 @@ public:
virtual void resize( int width, int height );
/// Refresh an area of the window
virtual void refresh( int left, int top, int width, int height ) { }
virtual void refresh( int left, int top, int width, int height )
{ (void)left; (void)top; (void)width; (void)height; }
/// Invalidate an area of the window
virtual void invalidateRect( int left, int top, int width, int height );
......
......@@ -404,7 +404,6 @@ static int WindowControl( vout_window_t *pWnd, int query, va_list args )
{
vout_window_sys_t* sys = pWnd->sys;
intf_thread_t *pIntf = sys->pIntf;
VoutManager *pVoutManager = VoutManager::instance( pIntf );
AsyncQueue *pQueue = AsyncQueue::instance( pIntf );
switch( query )
......
......@@ -493,6 +493,8 @@ union tar_buffer {
int tar_open( TAR **t, char *pathname, int oflags )
{
(void)oflags;
gzFile f = gzopen( pathname, "rb" );
if( f == NULL )
{
......@@ -713,6 +715,8 @@ static void * currentGzVp = NULL;
int gzopen_frontend( const char *pathname, int oflags, int mode )
{
(void)mode;
const char *gzflags;
gzFile gzf;
......
......@@ -138,7 +138,6 @@ void ThemeRepository::parseDirectory( const string &rDir_locale )
{
DIR *pDir;
char *pszDirContent;
vlc_value_t val, text;
// Path separator
const string &sep = OSFactory::instance( getIntf() )->getDirSeparator();
......@@ -167,7 +166,7 @@ void ThemeRepository::parseDirectory( const string &rDir_locale )
{
string path = rDir + sep + name;
string shortname = name.substr( 0, name.size() - 4 );
for( int i = 0; i < shortname.size(); i++ )
for( string::size_type i = 0; i < shortname.size(); i++ )
shortname[i] = ( i == 0 ) ?
toupper( shortname[i] ) :
tolower( shortname[i] );
......@@ -188,6 +187,7 @@ int ThemeRepository::changeSkin( vlc_object_t *pIntf, char const *pVariable,
vlc_value_t oldval, vlc_value_t newval,
void *pData )
{
(void)pIntf; (void)oldval;
ThemeRepository *pThis = (ThemeRepository*)(pData);
if( !strcmp( pVariable, "intf-skins-interactive" ) )
......
......@@ -71,8 +71,9 @@ void Tooltip::hide()
}
void Tooltip::onUpdate( Subject<VarText> &rVariable , void *arg)
void Tooltip::onUpdate( Subject<VarText> &rVariable, void *arg )
{
(void)arg;
// Redisplay the tooltip
displayText( ((VarText&)rVariable).get() );
}
......
......@@ -75,7 +75,7 @@ TopWindow::~TopWindow()
void TopWindow::processEvent( EvtFocus &rEvtFocus )
{
// fprintf(stderr, rEvtFocus.getAsString().c_str());
(void)rEvtFocus;
}
......@@ -130,9 +130,10 @@ void TopWindow::processEvent( EvtMotion &rEvtMotion )
void TopWindow::processEvent( EvtLeave &rEvtLeave )
{
(void)rEvtLeave;
// No more hit control
setLastHit( NULL );
if( !m_pCapturingControl )
{
m_rWindowManager.hideTooltip();
......
......@@ -178,7 +178,6 @@ VlcProc::VlcProc( intf_thread_t *pIntf ): SkinObject( pIntf ),
// Called when we have an interaction dialog to display
var_Create( pIntf, "interaction", VLC_VAR_ADDRESS );
var_AddCallback( pIntf, "interaction", onInteraction, this );
interaction_Register( pIntf );
// initialize variables refering to liblvc and playlist objects
init_variables();
......@@ -253,6 +252,7 @@ void VlcProc::CmdManage::execute()
int VlcProc::onInputNew( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldval, vlc_value_t newval, void *pParam )
{
(void)pObj; (void)pVariable; (void)oldval;
VlcProc *pThis = (VlcProc*)pParam;
input_thread_t *pInput = static_cast<input_thread_t*>(newval.p_address);
......@@ -269,6 +269,7 @@ int VlcProc::onItemChange( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldval, vlc_value_t newval,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldval;
VlcProc *pThis = (VlcProc*)pParam;
input_item_t *p_item = static_cast<input_item_t*>(newval.p_address);
......@@ -287,6 +288,7 @@ int VlcProc::onItemAppend( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
playlist_add_t *p_add = static_cast<playlist_add_t*>(newVal.p_address);
......@@ -304,6 +306,7 @@ int VlcProc::onItemDelete( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
int i_id = newVal.i_int;
......@@ -321,6 +324,7 @@ int VlcProc::onInteraction( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
interaction_dialog_t *p_dialog = (interaction_dialog_t *)(newVal.p_address);
......@@ -334,6 +338,7 @@ int VlcProc::onEqBandsChange( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
// Post a set equalizer bands command
......@@ -351,6 +356,7 @@ int VlcProc::onEqPreampChange( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)pObj; (void)pVariable; (void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
EqualizerPreamp *pVarPreamp = (EqualizerPreamp*)(pThis->m_cVarEqPreamp.get());
......@@ -368,6 +374,7 @@ int VlcProc::onGenericCallback( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
......@@ -412,6 +419,7 @@ int VlcProc::onGenericCallback2( vlc_object_t *pObj, const char *pVariable,
vlc_value_t oldVal, vlc_value_t newVal,
void *pParam )
{
(void)oldVal;
VlcProc *pThis = (VlcProc*)pParam;
AsyncQueue *pQueue = AsyncQueue::instance( pThis->getIntf() );
......@@ -467,6 +475,7 @@ int VlcProc::onGenericCallback2( vlc_object_t *pObj, const char *pVariable,
void VlcProc::on_item_current_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)p_obj;
input_item_t *p_item = static_cast<input_item_t*>(newVal.p_address);
// Update short name
......@@ -641,6 +650,7 @@ void VlcProc::on_intf_event_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
......@@ -651,6 +661,7 @@ void VlcProc::on_bit_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
......@@ -661,6 +672,7 @@ void VlcProc::on_sample_rate_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
input_thread_t* pInput = (input_thread_t*) p_obj;
assert( getIntf()->p_sys->p_input == NULL || getIntf()->p_sys->p_input == pInput );
......@@ -670,6 +682,7 @@ void VlcProc::on_can_record_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRandom, var_GetBool( pPlaylist, "random" ) );
......@@ -677,6 +690,7 @@ void VlcProc::on_random_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_loop_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarLoop, var_GetBool( pPlaylist, "loop" ) );
......@@ -684,6 +698,7 @@ void VlcProc::on_loop_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_repeat_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
playlist_t* pPlaylist = (playlist_t*) p_obj;
SET_BOOL( m_cVarRepeat, var_GetBool( pPlaylist, "repeat" ) );
......@@ -701,6 +716,7 @@ void VlcProc::on_volume_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)newVal;
aout_instance_t* pAout = (aout_instance_t*) p_obj;
char *pFilters = newVal.psz_string;
......@@ -717,7 +733,7 @@ void VlcProc::on_audio_filter_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_intf_show_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)p_obj;
(void)p_obj; (void)newVal;
bool b_fullscreen = getFullscreenVar().get();
if( !b_fullscreen )
......@@ -762,6 +778,7 @@ void VlcProc::on_intf_show_changed( vlc_object_t* p_obj, vlc_value_t newVal )
void VlcProc::on_mouse_moved_changed( vlc_object_t* p_obj, vlc_value_t newVal )
{
(void)p_obj; (void)newVal;
FscWindow* pFscWindow = VoutManager::instance( getIntf() )->getFscWindow();
if( pFscWindow )
pFscWindow->onMouseMoved();
......
......@@ -50,8 +50,8 @@ void VoutManager::destroy( intf_thread_t *pIntf )
VoutManager::VoutManager( intf_thread_t *pIntf ): SkinObject( pIntf ),
m_pVoutMainWindow( NULL ), m_pFscWindow( NULL ), m_pCtrlVideoVec(),
m_pCtrlVideoVecBackup(), m_SavedWndVec()
m_pCtrlVideoVec(), m_pCtrlVideoVecBackup(), m_SavedWndVec(),
m_pVoutMainWindow( NULL ), m_pFscWindow( NULL )
{
m_pVoutMainWindow = new VoutMainWindow( getIntf() );
......@@ -283,6 +283,7 @@ void VoutManager::setFullscreenWnd( vout_window_t *pWnd, bool b_fullscreen )
void VoutManager::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)arg;
VarBool &rFullscreen = VlcProc::instance( getIntf() )->getFullscreenVar();
if( &rVariable == &rFullscreen )
{
......
......@@ -38,7 +38,7 @@ VoutWindow::VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
GenericWindow( pIntf, 0, 0, false, false, pParent,
GenericWindow::VoutWindow ),
m_pWnd( pWnd ), original_width( width ), original_height( height ),
m_pParentWindow( pParent ), m_pCtrlVideo( NULL )
m_pCtrlVideo( NULL ), m_pParentWindow( pParent )
{
if( m_pWnd )
{
......@@ -51,7 +51,6 @@ VoutWindow::VoutWindow( intf_thread_t *pIntf, vout_window_t* pWnd,
m_pWnd->handle.hwnd = getOSHandle();
#endif
}
}
......
......@@ -32,9 +32,9 @@
WindowManager::WindowManager( intf_thread_t *pIntf ):
SkinObject( pIntf ), m_magnet( 0 ), m_direction( kNone ),
m_maximizeRect(0, 0, 50, 50), m_pTooltip( NULL ), m_pPopup( NULL ),
m_alpha( 255 ), m_moveAlpha( 255 ), m_opacityEnabled( false )
SkinObject( pIntf ), m_magnet( 0 ), m_alpha( 255 ), m_moveAlpha( 255 ),
m_opacityEnabled( false ), m_opacity( 255 ), m_direction( kNone ),
m_maximizeRect(0, 0, 50, 50), m_pTooltip( NULL ), m_pPopup( NULL )
{
// Create and register a variable for the "on top" status
VarManager *pVarManager = VarManager::instance( getIntf() );
......@@ -492,6 +492,7 @@ void WindowManager::buildDependSet( WinSet_t &rWinSet,
void WindowManager::checkAnchors( TopWindow *pWindow,
int &xOffset, int &yOffset ) const
{
(void)pWindow;
WinSet_t::const_iterator itMov, itSta;
AncList_t::const_iterator itAncMov, itAncSta;
......
......@@ -63,6 +63,7 @@ VarBoolAndBool::~VarBoolAndBool()
void VarBoolAndBool::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
if( m_value != ( m_rVar1.get() && m_rVar2.get() ) )
{
m_value = ( m_rVar1.get() && m_rVar2.get() );
......@@ -88,8 +89,9 @@ VarBoolOrBool::~VarBoolOrBool()
}
void VarBoolOrBool::onUpdate( Subject<VarBool> &rVariable , void*arg)
void VarBoolOrBool::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
if( m_value != ( m_rVar1.get() || m_rVar2.get() ) )
{
m_value = ( m_rVar1.get() || m_rVar2.get() );
......@@ -111,8 +113,9 @@ VarNotBool::~VarNotBool()
}
void VarNotBool::onUpdate( Subject<VarBool> &rVariable, void*arg )
void VarNotBool::onUpdate( Subject<VarBool> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
notify();
}
......
......@@ -85,7 +85,7 @@ public:
ConstIterator operator[]( int n ) const;
/// Execute the action associated to this item
virtual void action( Elem_t *pItem ) { }
virtual void action( Elem_t *pItem ) { (void)pItem; }
/// Get a reference on the position variable
VarPercent &getPositionVar() const
......
......@@ -188,6 +188,7 @@ void VarText::set( const UString &rText )
void VarText::onUpdate( Subject<VarPercent> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
UString newText = get();
// If the text has changed, notify the observers
if( newText != m_lastText )
......@@ -200,6 +201,7 @@ void VarText::onUpdate( Subject<VarPercent> &rVariable, void *arg )
void VarText::onUpdate( Subject<VarText> &rVariable, void *arg )
{
(void)rVariable; (void)arg;
UString newText = get();
// If the text has changed, notify the observers
if( newText != m_lastText )
......
......@@ -28,9 +28,9 @@
const string VarTree::m_type = "tree";
VarTree::VarTree( intf_thread_t *pIntf )
: Variable( pIntf ), m_id( 0 ), m_selected( false ), m_playing( false ),
m_expanded( false ), m_deleted( false ),
m_pData( NULL ), m_pParent( NULL ), m_readonly( false )
: Variable( pIntf ), m_pParent( NULL ), m_id( 0 ), m_pData( NULL ),
m_readonly( false ), m_selected( false ), m_playing( false ),
m_expanded( false ), m_deleted( false )
{
// Create the position variable
m_cPosition = VariablePtr( new VarPercent( pIntf ) );
......@@ -40,10 +40,10 @@ VarTree::VarTree( intf_thread_t *pIntf )
VarTree::VarTree( intf_thread_t *pIntf, VarTree *pParent, int id,
const UStringPtr &rcString, bool selected, bool playing,
bool expanded, bool readonly, void *pData )
: Variable( pIntf ), m_id( id ), m_cString( rcString ),
m_selected( selected ), m_playing( playing ), m_expanded( expanded ),
m_deleted( false ), m_pData( pData ), m_pParent( pParent ),
m_readonly( readonly )
: Variable( pIntf ), m_pParent( pParent ),
m_id( id ), m_pData( pData ), m_cString( rcString ),
m_readonly( readonly ), m_selected( selected ), m_playing( playing ),
m_expanded( expanded ), m_deleted( false )
{
// Create the position variable
m_cPosition = VariablePtr( new VarPercent( pIntf ) );
......
......@@ -131,7 +131,7 @@ public:
void removeChild( Iterator it ) { m_children.erase( it ); }
/// Execute the action associated to this item
virtual void action( VarTree *pItem ) { }
virtual void action( VarTree *pItem ) { (void)pItem; }
/// Get a reference on the position variable
VarPercent &getPositionVar() const
......
......@@ -83,6 +83,7 @@ VariablePtr EqualizerBands::getBand( int band )
void EqualizerBands::onUpdate( Subject<VarPercent> &rBand, void *arg )
{
(void)rBand; (void)arg;
aout_instance_t *pAout = NULL;
playlist_t *pPlaylist = getIntf()->p_sys->p_playlist;
......
......@@ -316,7 +316,7 @@ void X11Display::testEWMH()
#define TEST_EWMH( name, value ) \
{\
name = XInternAtom( m_pDisplay, value, False );\
int i;\
unsigned int i;\
for( i = 0; i < i_items; i++ )\
{\
if( p_args.p_atom[i] == name ) break;\
......@@ -428,6 +428,7 @@ void X11Display::blendPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g,
void X11Display::putPixel8( uint8_t *pPixel, uint8_t r, uint8_t g,
uint8_t b, uint8_t a ) const
{
(void)a;
*pPixel = 255 - putPixel<uint8_t>(r,g,b);
}
......@@ -435,6 +436,7 @@ void X11Display::putPixel8( uint8_t *pPixel, uint8_t r, uint8_t g,
void X11Display::putPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g,
uint8_t b, uint8_t a ) const
{
(void)a;
uint16_t value = putPixel<uint16_t>(r, g, b);
pPixel[1] = value; value >>= 8;
......@@ -445,6 +447,7 @@ void X11Display::putPixel16MSB( uint8_t *pPixel, uint8_t r, uint8_t g,
void X11Display::putPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g,
uint8_t b, uint8_t a ) const
{
(void)a;
uint16_t value = putPixel<uint16_t>(r,g,b);
pPixel[0] = value; value >>= 8;
pPixel[1] = value;
......@@ -454,6 +457,7 @@ void X11Display::putPixel16LSB( uint8_t *pPixel, uint8_t r, uint8_t g,
void X11Display::putPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g,
uint8_t b, uint8_t a ) const
{
(void)a;
uint32_t value = putPixel<uint32_t>(r,g,b);
pPixel[3] = value; value >>= 8;
......@@ -466,6 +470,7 @@ void X11Display::putPixel32MSB( uint8_t *pPixel, uint8_t r, uint8_t g,
void X11Display::putPixel32LSB( uint8_t *pPixel, uint8_t r, uint8_t g,
uint8_t b, uint8_t a ) const
{
(void)a;
uint32_t value = putPixel<uint32_t>(r,g,b);
pPixel[0] = value; value >>= 8;
......
......@@ -136,6 +136,7 @@ void X11DragDrop::dndPosition( ldata_t data )
void X11DragDrop::dndLeave( ldata_t data )
{
(void)data;
}
......
......@@ -134,7 +134,8 @@ public:
virtual void getMousePos( int &rXPos, int &rYPos ) const;
/// Change the cursor
virtual void changeCursor( CursorType_t type ) const { /*TODO*/ }
virtual void changeCursor( CursorType_t type ) const
{ /*TODO*/ (void)type; }
/// Delete a directory recursively
virtual void rmDir( const string &rPath );
......
......@@ -176,7 +176,7 @@ void X11Loop::handleX11Event()
XInternAtom( XDISPLAY, "WM_DELETE_WINDOW", False);
if( event.xclient.message_type == wm_protocols &&
event.xclient.data.l[0] == wm_delete )
(Atom)event.xclient.data.l[0] == wm_delete )
{
msg_Dbg( getIntf(), "Received WM_DELETE_WINDOW message" );
libvlc_Quit( getIntf()->p_libvlc );
......
......@@ -30,6 +30,7 @@ X11Popup::X11Popup( intf_thread_t *pIntf, X11Display &rDisplay )
: OSPopup( pIntf )
{
// TODO
(void)rDisplay;
}
......@@ -42,6 +43,7 @@ X11Popup::~X11Popup()
void X11Popup::show( int xPos, int yPos )
{
// TODO
(void)xPos; (void)yPos;
}
......@@ -54,18 +56,21 @@ void X11Popup::hide()
void X11Popup::addItem( const string &rLabel, int pos )
{
// TODO
(void)rLabel; (void)pos;
}
void X11Popup::addSeparator( int pos )
{
// TODO
(void)pos;
}
int X11Popup::getPosFromId( int id ) const
{
// TODO
(void)id;
return 0;
}
......
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