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

Fix warnings

parent b81b83a8
......@@ -47,8 +47,10 @@
/***********************************************************************
* Globals
***********************************************************************/
#ifdef __APPLE__
#pragma mark -
#pragma mark Globals
#endif
extern NPNetscapeFuncs *gNetscapeFuncs; /* Netscape Function table */
static inline int getMinorVersion() { return gNetscapeFuncs->version & 0xFF; }
......
......@@ -51,8 +51,6 @@
/***********************************************************************
* Globals
***********************************************************************/
#pragma mark -
#pragma mark Globals
NPNetscapeFuncs *gNetscapeFuncs; /* Netscape Function table */
static const char *gUserAgent; /* User agent string */
......
......@@ -611,7 +611,6 @@ LibvlcMediaDescriptionNPObject::getProperty(int index, npapi::OutVariant &result
auto media = mp.media();
if( !media )
RETURN_ON_ERROR;
const char *info;
switch( index )
{
case ID_meta_title:
......@@ -707,7 +706,7 @@ enum LibvlcPlaylistItemsNPObjectMethodIds
RuntimeNPObject::InvokeResult
LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
uint32_t argCount, npapi::OutVariant& result)
uint32_t argCount, npapi::OutVariant& )
{
/* is plugin still running */
if( isPluginRunning() )
......@@ -726,7 +725,7 @@ LibvlcPlaylistItemsNPObject::invoke(int index, const NPVariant *args,
case ID_playlistitems_remove:
{
if ( argCount < 1 )
INVOKERESULT_INVALID_ARGS;
return INVOKERESULT_INVALID_ARGS;
auto v = npapi::Variant( args[0] );
if( v.is<int>() )
{
......@@ -1484,7 +1483,7 @@ enum LibvlcVideoNPObjectMethodIds
RuntimeNPObject::InvokeResult
LibvlcVideoNPObject::invoke(int index, const NPVariant *,
uint32_t argCount, npapi::OutVariant& result)
uint32_t argCount, npapi::OutVariant&)
{
/* is plugin still running */
if( isPluginRunning() )
......@@ -1665,7 +1664,7 @@ enum LibvlcMarqueeNPObjectMethodIds
RuntimeNPObject::InvokeResult
LibvlcMarqueeNPObject::invoke(int index, const NPVariant *,
uint32_t, npapi::OutVariant& result)
uint32_t, npapi::OutVariant&)
{
if( !isPluginRunning() )
return INVOKERESULT_GENERIC_ERROR;
......@@ -1885,8 +1884,6 @@ RuntimeNPObject::InvokeResult
LibvlcDeinterlaceNPObject::invoke(int index, const NPVariant *args,
uint32_t argCount, npapi::OutVariant &)
{
char *psz;
if( !isPluginRunning() )
return INVOKERESULT_GENERIC_ERROR;
......
......@@ -56,7 +56,7 @@ RuntimeNPObject::InvokeResult RuntimeNPObject::invoke(int, const NPVariant *, ui
return INVOKERESULT_GENERIC_ERROR;
}
RuntimeNPObject::InvokeResult RuntimeNPObject::invokeDefault(const NPVariant *, uint32_t, npapi::OutVariant& result)
RuntimeNPObject::InvokeResult RuntimeNPObject::invokeDefault(const NPVariant *, uint32_t, npapi::OutVariant&)
{
/* return void */
return INVOKERESULT_NO_ERROR;
......
......@@ -259,7 +259,7 @@ NPError VlcPluginBase::get_root_layer(void *value)
}
#endif
bool VlcPluginBase::handle_event(void *event)
bool VlcPluginBase::handle_event(void *)
{
return false;
}
......
......@@ -37,10 +37,10 @@ VlcPluginGtk::VlcPluginGtk(NPP instance, NPuint16_t mode) :
parent(NULL),
parent_vbox(NULL),
video_container(NULL),
fullscreen_win(NULL),
toolbar(NULL),
time_slider(NULL),
vol_slider(NULL),
fullscreen_win(NULL),
is_fullscreen(false),
is_toolbar_visible(false),
m_timer_update_timeout( 0 )
......@@ -176,9 +176,9 @@ static void toolbar_handler(GtkToolButton *btn, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
const gchar *stock_id = gtk_tool_button_get_stock_id(btn);
for (int i = 0; i < sizeof(tool_actions)/sizeof(tool_actions_t); ++i) {
if (!strcmp(stock_id, tool_actions[i].stock_id)) {
plugin->control_handler(tool_actions[i].clicked);
for (auto a : tool_actions ) {
if (!strcmp(stock_id, a.stock_id)) {
plugin->control_handler(a.clicked);
return;
}
}
......@@ -193,9 +193,10 @@ static void menu_handler(GtkMenuItem *menuitem, gpointer user_data)
plugin->set_toolbar_visible(gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)));
return;
}
for (int i = 0; i < sizeof(tool_actions)/sizeof(tool_actions_t); ++i) {
if (!strcmp(stock_id, tool_actions[i].stock_id)) {
plugin->control_handler(tool_actions[i].clicked);
for (auto a : tool_actions)
{
if (!strcmp(stock_id, a.stock_id)) {
plugin->control_handler(a.clicked);
return;
}
}
......@@ -241,7 +242,7 @@ void VlcPluginGtk::popup_menu()
0, gtk_get_current_event_time());
}
static bool video_button_handler(GtkWidget *widget, GdkEventButton *event, gpointer user_data)
static bool video_button_handler(GtkWidget*, GdkEventButton *event, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
if (event->button == 3 && event->type == GDK_BUTTON_PRESS) {
......@@ -254,21 +255,21 @@ static bool video_button_handler(GtkWidget *widget, GdkEventButton *event, gpoin
return false;
}
static bool video_popup_handler(GtkWidget *widget, gpointer user_data)
static bool video_popup_handler(GtkWidget*, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
plugin->popup_menu();
return true;
}
static bool video_size_handler(GtkWidget *widget, GdkRectangle *rect, gpointer user_data)
static bool video_size_handler(GtkWidget*, GdkRectangle *rect, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
plugin->resize_video_xwindow(rect);
return true;
}
static bool video_expose_handler(GtkWidget *widget, GdkEvent *event, gpointer user_data)
static bool video_expose_handler(GtkWidget*, GdkEvent *event, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
GdkEventExpose *event_expose = (GdkEventExpose *) event;
......@@ -318,14 +319,14 @@ gboolean VlcPluginGtk::update_time_slider(gpointer user_data)
return FALSE;
}
static bool time_slider_handler(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data)
static bool time_slider_handler(GtkRange*, GtkScrollType, gdouble value, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
plugin->getMD().setPosition( value / 100.0 );
return false;
}
static bool vol_slider_handler(GtkRange *range, GtkScrollType scroll, gdouble value, gpointer user_data)
static bool vol_slider_handler(GtkRange*, GtkScrollType, gdouble value, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
plugin->getMD().setVolume( value );
......@@ -338,7 +339,7 @@ static void fullscreen_win_visibility_handler(GtkWidget *widget, gpointer user_d
plugin->do_set_fullscreen(gtk_widget_get_visible(widget));
}
static gboolean fullscreen_win_keypress_handler(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
static gboolean fullscreen_win_keypress_handler(GtkWidget*, GdkEventKey *event, gpointer user_data)
{
VlcPluginGtk *plugin = (VlcPluginGtk *) user_data;
switch (event->keyval)
......
......@@ -55,7 +55,6 @@ public:
void resize_video_xwindow(GdkRectangle *rect);
GdkPixbuf *cone_icon;
GtkWidget *time_slider, *vol_slider;
private:
void set_player_window();
......@@ -66,6 +65,7 @@ private:
GtkWidget *parent, *parent_vbox, *video_container;
GtkWidget *fullscreen_win;
GtkWidget *toolbar;
GtkWidget *time_slider, *vol_slider;
gulong video_container_size_handler_id;
Display *display;
......
......@@ -472,7 +472,7 @@ void NPP_StreamAsFile( NPP instance, NPStream *stream, const char* )
}
}
void NPP_URLNotify( NPP instance, const char* ,
void NPP_URLNotify( NPP, const char* ,
NPReason, void* )
{
/***** Insert NPP_URLNotify code here *****\
......
......@@ -125,7 +125,7 @@ bool VlcWindowlessXCB::handle_event(void *event)
m_media_width * m_media_height * 4,
(const uint8_t *)&m_frame_buf[0]);
if (err = xcb_request_check(m_conn, cookie))
if ((err = xcb_request_check(m_conn, cookie)))
{
fprintf(stderr, "Unable to put picture into drawable. Error %d\n",
err->error_code);
......
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