Mark unused params, remove unused macro and args (bug 14401)

This commit is contained in:
rim
2018-05-29 02:23:26 +03:00
committed by Landry Breuil
parent ceb5a7d347
commit 66a0d4bfc9
9 changed files with 21 additions and 18 deletions

View File

@@ -151,7 +151,7 @@ apps_lookup_pid (GArray *apps, GPid pid)
}
static void
application_opened (WnckScreen *screen, WnckApplication *application, XtmAppManager *manager)
application_opened (WnckScreen *screen __unused, WnckApplication *application, XtmAppManager *manager)
{
GPid pid = app_get_pid (application);
G_DEBUG_FMT ("Application opened %p %d", (void*)application, pid);
@@ -159,7 +159,7 @@ application_opened (WnckScreen *screen, WnckApplication *application, XtmAppMana
}
static void
application_closed (WnckScreen *screen, WnckApplication *application, XtmAppManager *manager)
application_closed (WnckScreen *screen __unused, WnckApplication *application, XtmAppManager *manager)
{
G_DEBUG_FMT ("Application closed %p", (void*)application);
apps_remove_application (manager->apps, application);

View File

@@ -130,7 +130,7 @@ xtm_process_monitor_draw (GtkWidget *widget, cairo_t *cr)
}
#else
static gboolean
xtm_process_monitor_expose (GtkWidget *widget, GdkEventExpose *event)
xtm_process_monitor_expose (GtkWidget *widget, GdkEventExpose *event __unused)
{
XtmProcessMonitor *monitor = XTM_PROCESS_MONITOR (widget);
guint minimum_history_length;

View File

@@ -154,7 +154,7 @@ xtm_process_tree_model_finalize (GObject *object)
}
static void
xtm_process_tree_model_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec)
xtm_process_tree_model_set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec __unused)
{
XtmProcessTreeModel *treemodel = XTM_PROCESS_TREE_MODEL (object);
switch (property_id)
@@ -166,7 +166,7 @@ xtm_process_tree_model_set_property (GObject *object, guint property_id, const G
}
static void
xtm_process_tree_model_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec)
xtm_process_tree_model_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec __unused)
{
XtmProcessTreeModel *treemodel = XTM_PROCESS_TREE_MODEL (object);
switch (property_id)
@@ -178,7 +178,7 @@ xtm_process_tree_model_get_property (GObject *object, guint property_id, GValue
}
static GtkTreeModelFlags
xtm_process_tree_model_get_flags (GtkTreeModel *model)
xtm_process_tree_model_get_flags (GtkTreeModel *model __unused)
{
return GTK_TREE_MODEL_ITERS_PERSIST;
}
@@ -857,7 +857,7 @@ reorder_children (GNode *parent, gpointer data)
}
static void
xtm_process_tree_model_rows_reordered (XtmProcessTreeModel *treemodel, GtkTreePath *path, GtkTreeIter *iter, gint *new_order, GtkTreeModel *model)
xtm_process_tree_model_rows_reordered (XtmProcessTreeModel *treemodel, GtkTreePath *path __unused, GtkTreeIter *iter __unused, gint *new_order, GtkTreeModel *model)
{
gint i, size;
GSequence *s_list;

View File

@@ -493,7 +493,7 @@ build_context_menu (XtmProcessTreeView *treeview, GPid pid)
}
static void
position_menu (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, XtmProcessTreeView *treeview)
position_menu (GtkMenu *menu __unused, gint *x, gint *y, gboolean *push_in, XtmProcessTreeView *treeview)
{
gdk_window_get_origin (gtk_tree_view_get_bin_window (GTK_TREE_VIEW (treeview)), x, y);
*x += 5;
@@ -664,7 +664,7 @@ visible_func (GtkTreeModel *model, GtkTreeIter *iter, XtmProcessTreeView *treevi
}
static gboolean
search_func (GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer user_data)
search_func (GtkTreeModel *model, gint column __unused, const gchar *key, GtkTreeIter *iter, gpointer user_data __unused)
{
gchar *cmdline, *cmdline_lower;
gchar *key_lower;
@@ -741,7 +741,7 @@ settings_changed (GObject *object, GParamSpec *pspec, XtmProcessTreeView *treevi
static void
expand_row (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, XtmProcessTreeView *treeview)
expand_row (GtkTreeModel *model __unused, GtkTreePath *path, GtkTreeIter *iter __unused, XtmProcessTreeView *treeview)
{
gtk_tree_view_expand_row (GTK_TREE_VIEW (treeview), path, FALSE);
}

View File

@@ -81,8 +81,8 @@ static void show_about_dialog (XtmProcessWindow *window);
static void
filter_entry_icon_pressed_cb (GtkEntry *entry,
gint position,
GdkEventButton *event,
gpointer data)
GdkEventButton *event __unused,
gpointer data __unused)
{
if (position == GTK_ENTRY_ICON_SECONDARY) {
gtk_entry_set_text (entry, "");
@@ -137,7 +137,7 @@ Select_Window (Display *dpy, int screen)
}
static void
xwininfo_clicked_cb (GtkButton *button, gpointer user_data) {
xwininfo_clicked_cb (GtkButton *button __unused, gpointer user_data) {
XtmProcessWindow *window = (XtmProcessWindow *) user_data;
Window selected_window;
Display *dpy;
@@ -553,7 +553,7 @@ xtm_process_window_get_model (XtmProcessWindow *window)
}
void
xtm_process_window_set_system_info (XtmProcessWindow *window, guint num_processes, gfloat cpu, gfloat memory, gchar* memory_str, gfloat swap, gchar* swap_str)
xtm_process_window_set_system_info (XtmProcessWindow *window, guint num_processes, gfloat cpu, gfloat memory, gchar* memory_str, gfloat swap __unused, gchar* swap_str)
{
gchar text[100];
gchar value[4];

View File

@@ -70,7 +70,6 @@ struct _XtmSettings
/*<private>*/
GValue values[N_PROPS];
};
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), XTM_TYPE_SETTINGS, XtmSettingsPriv))
G_DEFINE_TYPE (XtmSettings, xtm_settings, G_TYPE_OBJECT)
static void xtm_settings_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec);

View File

@@ -118,7 +118,7 @@ get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system)
}
static gboolean
get_task_details (kvm_t *kd, struct kinfo_proc *kp, Task *task)
get_task_details (struct kinfo_proc *kp, Task *task)
{
struct passwd *pw;
char buf[1024], *p;
@@ -250,7 +250,7 @@ get_task_list (GArray *task_list)
for (i = 0; i < cnt; kp++, i++)
{
get_task_details (kd, kp, &task);
get_task_details (kp, &task);
g_array_append_val (task_list, task);
}

View File

@@ -122,7 +122,7 @@ xtm_task_manager_finalize (GObject *object)
}
static void
setting_changed (GObject *object, GParamSpec *pspec, XtmTaskManager *manager)
setting_changed (GObject *object, GParamSpec *pspec __unused, XtmTaskManager *manager __unused)
{
g_object_get (object, "more-precision", &more_precision, NULL);
g_object_get (object, "full-command-line", &full_cmdline, NULL);

View File

@@ -99,6 +99,10 @@ gint task_pid_compare_fn (gconstpointer a, gconstpointer b);
gboolean set_priority_to_pid (GPid pid, gint priority);
#ifndef __unused
# define __unused __attribute__((__unused__))
#endif
#if DEBUG
# define G_DEBUG_FMT(fmt, args...) g_debug((fmt), ##args)
#else