[ltt-dev] [LTTV PATCH] Fix some warnings in lttv/modules/gui

Mathieu Desnoyers compudj at krystal.dyndns.org
Tue Jan 25 10:32:21 EST 2011


* Alexandre Montplaisir (alexandre.montplaisir at polymtl.ca) wrote:
> I want in on the warning fixing too!
> 
> Mostly unused variables.
> 
> Big removal of unused and commented code in histoeventhooks.c, but this
> code already exists in other modules so we could add it back easily if
> we wanted to add more functionality.

merged, thanks !

Mathieu

> 
> Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir at polymtl.ca>
> ---
>  lttv/modules/gui/controlflow/cfv.c                 |    3 +-
>  lttv/modules/gui/controlflow/drawing.c             |   14 +-
>  lttv/modules/gui/controlflow/eventhooks.c          |   22 --
>  lttv/modules/gui/controlflow/lttv_plugin_cfv.c     |    2 +-
>  lttv/modules/gui/controlflow/processlist.c         |    7 +-
>  lttv/modules/gui/detailedevents/events.c           |   18 +-
>  lttv/modules/gui/detailedevents/lttv_plugin_evd.c  |    2 +-
>  lttv/modules/gui/filter/filter.c                   |    4 -
>  lttv/modules/gui/histogram/histobuttonwidget.h     |    5 -
>  lttv/modules/gui/histogram/histocfv.c              |   15 +-
>  lttv/modules/gui/histogram/histodrawing.c          |    7 +-
>  lttv/modules/gui/histogram/histodrawing.h          |   18 -
>  lttv/modules/gui/histogram/histodrawitem.c         |    1 +
>  lttv/modules/gui/histogram/histoeventhooks.c       |  326 +-------------------
>  lttv/modules/gui/interrupts/interrupts.c           |   48 +---
>  lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c |   16 +-
>  lttv/modules/gui/lttvwindow/lttvwindow/interface.c |    1 -
>  .../gui/lttvwindow/lttvwindow/lttv_plugin.c        |    8 +-
>  .../gui/lttvwindow/lttvwindow/lttv_plugin_tab.c    |    2 +-
>  .../modules/gui/lttvwindow/lttvwindow/lttvwindow.c |    4 +-
>  lttv/modules/gui/resourceview/cfv.c                |   14 -
>  lttv/modules/gui/resourceview/drawing.c            |   17 +-
>  lttv/modules/gui/resourceview/eventhooks.c         |   51 +---
>  lttv/modules/gui/resourceview/lttv_plugin_cfv.c    |    2 +-
>  lttv/modules/gui/resourceview/processlist.c        |    9 +-
>  lttv/modules/gui/statistics/statistics.c           |    4 +-
>  lttv/modules/gui/tracecontrol/tracecontrol.c       |   25 +-
>  27 files changed, 54 insertions(+), 591 deletions(-)
> 
> diff --git a/lttv/modules/gui/controlflow/cfv.c b/lttv/modules/gui/controlflow/cfv.c
> index 603ac63..d807b7c 100644
> --- a/lttv/modules/gui/controlflow/cfv.c
> +++ b/lttv/modules/gui/controlflow/cfv.c
> @@ -21,6 +21,7 @@
>  #endif
>  
>  #include <glib.h>
> +#include <glib/gprintf.h>
>  #include <gtk/gtk.h>
>  #include <gdk/gdk.h>
>  #include <lttv/lttv.h>
> @@ -87,8 +88,6 @@ gboolean cfv_scroll_event(GtkWidget *widget, GdkEventScroll *event,
>  static void        property_button      (GtkToolButton *toolbutton,
>                                            gpointer       user_data)
>  {
> -  ControlFlowData *control_flow_data = (ControlFlowData*)user_data;
> -
>    g_printf("CFV Property button clicked\n");
>  
>  }
> diff --git a/lttv/modules/gui/controlflow/drawing.c b/lttv/modules/gui/controlflow/drawing.c
> index 10df57d..51f4e37 100644
> --- a/lttv/modules/gui/controlflow/drawing.c
> +++ b/lttv/modules/gui/controlflow/drawing.c
> @@ -162,20 +162,11 @@ void drawing_data_request(Drawing_t *drawing,
>    {
>      /* find the tracehooks */
>      LttvTracesetContext *tsc = lttvwindow_get_traceset_context(tab);
> -
>      LttvTraceset *traceset = tsc->ts;
> -
> -    guint i, k, l, nb_trace;
> -
> +    guint i, k, nb_trace;
>      LttvTraceState *ts;
> -
> -    LttvTracefileState *tfs;
> -
>      GArray *hooks;
> -
>      LttvTraceHook *th;
> -
> -    guint ret;
>      gint first_after;
>  
>      nb_trace = lttv_traceset_number(traceset);
> @@ -469,7 +460,6 @@ void drawing_data_request(Drawing_t *drawing,
>  
>  static void set_last_start(gpointer key, gpointer value, gpointer user_data)
>  {
> -  ProcessInfo *process_info = (ProcessInfo*)key;
>    HashedProcessData *hashed_process_data = (HashedProcessData*)value;
>    guint x = GPOINTER_TO_UINT(user_data);
>  
> @@ -491,7 +481,6 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState
>  {
>    g_debug("Begin of data request");
>    ControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
>    TimeWindow time_window = 
>      lttvwindow_get_time_window(cfd->tab);
>  
> @@ -543,7 +532,6 @@ void drawing_request_expose(EventsRequest *events_request,
>    guint x_end;
>  
>    ControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
>    Drawing_t *drawing = cfd->drawing;
>    
>    TimeWindow time_window = 
> diff --git a/lttv/modules/gui/controlflow/eventhooks.c b/lttv/modules/gui/controlflow/eventhooks.c
> index 540ac9a..ff056ac 100644
> --- a/lttv/modules/gui/controlflow/eventhooks.c
> +++ b/lttv/modules/gui/controlflow/eventhooks.c
> @@ -92,7 +92,6 @@ extern GSList *g_legend_list;
>  static gint background_ready(void *hook_data, void *call_data)
>  {
>    ControlFlowData *control_flow_data = (ControlFlowData *)hook_data;
> -  LttvTrace *trace = (LttvTrace*)call_data;
>  
>    control_flow_data->background_info_waiting--;
>    
> @@ -219,7 +218,6 @@ h_guicontrolflow(LttvPlugin *plugin)
>  
>  int event_selected_hook(void *hook_data, void *call_data)
>  {
> -  ControlFlowData *control_flow_data = (ControlFlowData*) hook_data;
>    guint *event_number = (guint*) call_data;
>  
>    g_debug("DEBUG : event selected by main window : %u", *event_number);
> @@ -289,7 +287,6 @@ int before_trywakeup_hook(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
>    LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
>  
>    LttEvent *e = ltt_tracefile_get_event(tfc->tf);
> @@ -314,7 +311,6 @@ int before_trywakeup_hook(void *hook_data, void *call_data)
>       * draw items from the beginning of the read for it. If it is not
>       * present, it's a new process and it was not present : it will
>       * be added after the state update. TOCHECK: What does that last para mean? */
> -    guint cpu = tfs->cpu;
>      guint trace_num = ts->parent.index;
>      LttvProcessState *process = lttv_state_find_process(ts, woken_cpu, woken_pid);
>      
> @@ -1435,8 +1431,6 @@ int before_process_release_hook(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
> -
>    LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
>  
>    LttEvent *e;
> @@ -1465,7 +1459,6 @@ int before_process_release_hook(void *hook_data, void *call_data)
>  
>    if(process != NULL) {
>      LttTime birth;
> -    guint pl_height = 0;
>      HashedProcessData *hashed_process_data = NULL;
>  
>      ProcessList *process_list = control_flow_data->process_list;
> @@ -1619,8 +1612,6 @@ int after_process_fork_hook(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
> -
>    LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
>  
>    LttEvent *e;
> @@ -2036,8 +2027,6 @@ int after_event_enum_process_hook(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
> -
>    LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
>  
>    guint first_cpu, nb_cpus, cpu;
> @@ -2051,8 +2040,6 @@ int after_event_enum_process_hook(void *hook_data, void *call_data)
>            tfc->t_context->t,tfc,NULL,NULL))
>        return FALSE;
>  
> -  LttTime evtime = ltt_event_time(e);
> -
>    /* Add process to process list (if not present) */
>    LttvProcessState *process_in;
>    LttTime birth;
> @@ -2175,9 +2162,7 @@ gint update_time_window_hook(void *hook_data, void *call_data)
>      /* Same scale (scrolling) */
>      g_info("scrolling");
>      LttTime *ns = &new_time_window->start_time;
> -    LttTime *nw = &new_time_window->time_width;
>      LttTime *os = &old_time_window->start_time;
> -    LttTime *ow = &old_time_window->time_width;
>      LttTime old_end = old_time_window->end_time;
>      LttTime new_end = new_time_window->end_time;
>      //if(ns<os+w<ns+w)
> @@ -2440,7 +2425,6 @@ gint continue_notify(void *hook_data, void *call_data)
>  gint update_current_time_hook(void *hook_data, void *call_data)
>  {
>    ControlFlowData *control_flow_data = (ControlFlowData*)hook_data;
> -  Drawing_t *drawing = control_flow_data->drawing;
>  
>    LttTime current_time = *((LttTime*)call_data);
>    
> @@ -2591,7 +2575,6 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data)
>  
>        /* Only draw for processes that are currently in the trace states */
>  
> -      ProcessList *process_list = control_flow_data->process_list;
>  #ifdef EXTRA_CHECK
>        /* Should be alike when background info is ready */
>        if(control_flow_data->background_info_waiting==0)
> @@ -2696,7 +2679,6 @@ int before_chunk(void *hook_data, void *call_data)
>  {
>    EventsRequest *events_request = (EventsRequest*)hook_data;
>    LttvTracesetState *tss = (LttvTracesetState*)call_data;
> -  ControlFlowData *cfd = (ControlFlowData*)events_request->viewer_data;
>  #if 0  
>    /* Desactivate sort */
>    gtk_tree_sortable_set_sort_column_id(
> @@ -2847,10 +2829,6 @@ int before_statedump_end(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
> -
> -  LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
> -
>    LttvTracesetState *tss = (LttvTracesetState*)tfc->t_context->ts_context;
>    ProcessList *process_list = control_flow_data->process_list;
>  
> diff --git a/lttv/modules/gui/controlflow/lttv_plugin_cfv.c b/lttv/modules/gui/controlflow/lttv_plugin_cfv.c
> index c23cfab..c9ea71e 100644
> --- a/lttv/modules/gui/controlflow/lttv_plugin_cfv.c
> +++ b/lttv/modules/gui/controlflow/lttv_plugin_cfv.c
> @@ -68,7 +68,7 @@ lttv_plugin_cfv_get_type (void)
>        sizeof (LttvPluginCFVClass),
>        NULL,   /* base_init */
>        NULL,   /* base_finalize */
> -      lttv_plugin_cfv_class_init,   /* class_init */
> +      (GClassInitFunc) lttv_plugin_cfv_class_init,   /* class_init */
>        NULL,   /* class_finalize */
>        NULL,   /* class_data */
>        sizeof (LttvPluginCFV),
> diff --git a/lttv/modules/gui/controlflow/processlist.c b/lttv/modules/gui/controlflow/processlist.c
> index 506dae1..e5f44a3 100644
> --- a/lttv/modules/gui/controlflow/processlist.c
> +++ b/lttv/modules/gui/controlflow/processlist.c
> @@ -152,9 +152,8 @@ gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
>        (ControlFlowData*)g_object_get_data(
>                  G_OBJECT(widget),
>                  "control_flow_data");
> -  Drawing_t *drawing = control_flow_data->drawing;
> -	unsigned int cell_height =
> -		get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
> +  unsigned int cell_height =
> +      get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
>  
>    switch(event->direction) {
>      case GDK_SCROLL_UP:
> @@ -168,7 +167,7 @@ gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
>      default:
>        g_error("should only scroll up and down.");
>    }
> -	return TRUE;
> +  return TRUE;
>  }
>  
>  
> diff --git a/lttv/modules/gui/detailedevents/events.c b/lttv/modules/gui/detailedevents/events.c
> index 7c9b66a..0c1a153 100644
> --- a/lttv/modules/gui/detailedevents/events.c
> +++ b/lttv/modules/gui/detailedevents/events.c
> @@ -47,6 +47,7 @@
>  #include <math.h>
>  
>  #include <glib.h>
> +#include <glib/gprintf.h>
>  #include <gtk/gtk.h>
>  #include <gdk/gdk.h>
>  #include <gdk/gdkx.h>
> @@ -511,7 +512,6 @@ gui_events(LttvPluginTab *ptab)
>  static gint background_ready(void *hook_data, void *call_data)
>  {
>    EventViewerData *event_viewer_data = (EventViewerData *)hook_data;
> -  LttvTrace *trace = (LttvTrace*)call_data;
>  
>    event_viewer_data->background_info_waiting--;
>  
> @@ -599,8 +599,6 @@ header_size_allocate(GtkWidget *widget,
>  
>  void tree_v_set_cursor(EventViewerData *event_viewer_data)
>  {
> -  GtkTreePath *path;
> -  
>    g_debug("set cursor cb");
>  
>  #if 0
> @@ -619,9 +617,6 @@ void tree_v_set_cursor(EventViewerData *event_viewer_data)
>  
>  void tree_v_get_cursor(EventViewerData *event_viewer_data)
>  {
> -  GtkTreePath *path;
> -  gint *indices;
> -  
>    g_debug("get cursor cb");
>    
>  
> @@ -660,8 +655,6 @@ void tree_v_move_cursor_cb (GtkWidget *widget,
>                              gpointer data)
>  {
>    GtkTreePath *path; // = gtk_tree_path_new();
> -  gint *indices;
> -  gdouble value;
>    EventViewerData *event_viewer_data = (EventViewerData*)data;
>    
>    g_debug("move cursor cb");
> @@ -1040,7 +1033,6 @@ static void        filter_button      (GtkToolButton *toolbutton,
>  gboolean tree_v_scroll_handler (GtkWidget *widget, GdkEventScroll *event, gpointer data)
>  {
>  	EventViewerData *event_viewer_data = (EventViewerData*) data;
> -	Tab *tab = event_viewer_data->tab;
>  
>  	switch(event->direction) {
>  		case GDK_SCROLL_UP:
> @@ -1095,7 +1087,6 @@ static void tree_selection_changed_cb (GtkTreeSelection *selection,
>      gpointer data)
>  {
>    g_debug("tree sel changed cb");
> -  EventViewerData *event_viewer_data = (EventViewerData*) data;
>  
>  #if 0
>      /* Set the cursor to currently selected event */
> @@ -1144,9 +1135,6 @@ static gint key_snooper(GtkWidget *grab_widget, GdkEventKey *event,
>  void v_scroll_cb (GtkAdjustment *adjustment, gpointer data)
>  {
>    EventViewerData *event_viewer_data = (EventViewerData*)data;
> -  LttvTracesetStats *tss =
> -    lttvwindow_get_traceset_stats(event_viewer_data->tab);
> -  LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
>    g_debug("SCROLL begin");
>    g_debug("SCROLL values : %g , %g, %g",
>        adjustment->value, event_viewer_data->previous_value,
> @@ -1304,7 +1292,6 @@ static gboolean events_check_handler(guint count, gboolean *stop_flag,
>  
>  static void get_events(double new_value, EventViewerData *event_viewer_data)
>  {
> -  GtkTreePath *tree_path;
>    LttvTracesetStats *tss =
>      lttvwindow_get_traceset_stats(event_viewer_data->tab);
>    LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
> @@ -1683,7 +1670,6 @@ gboolean update_current_time(void * hook_data, void * call_data)
>    const LttTime * current_time = (LttTime*)call_data;
>    LttvTracesetContext * tsc =
>          lttvwindow_get_traceset_context(event_viewer_data->tab);
> -  GtkTreePath *path;
>    
>    /* If the currently selected event time != current time, set the first event
>     * with this time as currently selected. */
> @@ -1825,8 +1811,6 @@ gboolean traceset_changed(void * hook_data, void * call_data)
>  gboolean filter_changed(void * hook_data, void * call_data)
>  {
>    EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
> -  LttvTracesetContext * tsc =
> -        lttvwindow_get_traceset_context(event_viewer_data->tab);
>  
>    event_viewer_data->main_win_filter = 
>      (LttvFilter*)call_data;
> diff --git a/lttv/modules/gui/detailedevents/lttv_plugin_evd.c b/lttv/modules/gui/detailedevents/lttv_plugin_evd.c
> index ae93579..3aeac8d 100644
> --- a/lttv/modules/gui/detailedevents/lttv_plugin_evd.c
> +++ b/lttv/modules/gui/detailedevents/lttv_plugin_evd.c
> @@ -67,7 +67,7 @@ lttv_plugin_evd_get_type (void)
>        sizeof (LttvPluginEVDClass),
>        NULL,   /* base_init */
>        NULL,   /* base_finalize */
> -      lttv_plugin_evd_class_init,   /* class_init */
> +      (GClassInitFunc) lttv_plugin_evd_class_init,   /* class_init */
>        NULL,   /* class_finalize */
>        NULL,   /* class_data */
>        sizeof (LttvPluginEVD),
> diff --git a/lttv/modules/gui/filter/filter.c b/lttv/modules/gui/filter/filter.c
> index 60e1783..2357465 100644
> --- a/lttv/modules/gui/filter/filter.c
> +++ b/lttv/modules/gui/filter/filter.c
> @@ -157,8 +157,6 @@ gui_filter(LttvPlugin *plugin)
>    g_debug("filter::gui_filter()");
>  
>    unsigned i;
> -  GtkCellRenderer *renderer;
> -  GtkTreeViewColumn *column;
>  
>    FilterViewerData* fvd = g_new(FilterViewerData,1);
>  
> @@ -464,8 +462,6 @@ gui_filter_destructor(FilterViewerData *fvd)
>  GtkWidget *
>  h_guifilter(LttvPlugin *plugin)
>  {
> -  FilterViewerData* f = gui_filter(plugin) ;
> -
>    return NULL;
>  }
>  
> diff --git a/lttv/modules/gui/histogram/histobuttonwidget.h b/lttv/modules/gui/histogram/histobuttonwidget.h
> index 7c2ed88..886b7f0 100644
> --- a/lttv/modules/gui/histogram/histobuttonwidget.h
> +++ b/lttv/modules/gui/histogram/histobuttonwidget.h
> @@ -69,11 +69,6 @@ ButtonWidget *histo_buttonwidget_construct(HistoControlFlowData *histocontrol_fl
>  
>  void histo_buttonwidget_destroy(ButtonWidget *buttonwidget);
>  
> -
> -static gboolean gplus( GtkWidget *widget,gpointer user_data);//assigned to zoomIn
> -static gboolean gMinus( GtkWidget *widget,gpointer user_data );//assigned to zoomOut
> -static gboolean gFit( GtkWidget *widget,gpointer user_data );//assigned to zoomFit
> -
>  GtkWidget *histo_buttonwidget_get_widget(ButtonWidget *button_widget);
>  void histo_update_pixmap_size(histoDrawing_t *value,
>                                      guint width);
> diff --git a/lttv/modules/gui/histogram/histocfv.c b/lttv/modules/gui/histogram/histocfv.c
> index 80c5c5a..1a5b8eb 100644
> --- a/lttv/modules/gui/histogram/histocfv.c
> +++ b/lttv/modules/gui/histogram/histocfv.c
> @@ -25,6 +25,7 @@
>  #include <gdk/gdk.h>
>  #include <lttv/lttv.h>
>  #include <lttvwindow/lttvwindow.h>
> +#include <lttvwindow/lttvwindowtraces.h>
>  
>  #include "histocfv.h"
>  #include "histodrawing.h"
> @@ -35,20 +36,6 @@
>  
>  extern GSList *g_histo_control_flow_data_list;
>  
> -static gboolean
> -header_size_allocate(GtkWidget *widget,
> -                        GtkAllocation *allocation,
> -                        gpointer user_data)
> -{
> -  histoDrawing_t *drawing = (histoDrawing_t*)user_data;
> -
> -  gtk_widget_set_size_request(drawing->ruler, -1, allocation->height);
> -  //gtk_widget_queue_resize(drawing->padding);
> -  //gtk_widget_queue_resize(drawing->ruler);
> -  gtk_container_check_resize(GTK_CONTAINER(drawing->ruler_hbox));
> -  return 0;
> -}
> -
>  
>  /*****************************************************************************
>   *              Histo Control Flow Viewer class implementation              *
> diff --git a/lttv/modules/gui/histogram/histodrawing.c b/lttv/modules/gui/histogram/histodrawing.c
> index 0b2adcb..72292be 100644
> --- a/lttv/modules/gui/histogram/histodrawing.c
> +++ b/lttv/modules/gui/histogram/histodrawing.c
> @@ -136,7 +136,6 @@ void histo_drawing_data_request_begin(EventsRequest *events_request, LttvTracese
>  {
>    g_debug("Begin of data request");
>    HistoControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
>    TimeWindow time_window = 
>      lttvwindow_get_time_window(cfd->tab);
>  
> @@ -157,7 +156,6 @@ void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState
>  {
>    g_debug("Begin of chunk");
>    HistoControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
>  
>    if(cfd->chunk_has_begun) return;
>  
> @@ -173,7 +171,6 @@ void histo_drawing_request_expose(EventsRequest *events_request,
>    histoDrawing_t *drawing = cfd->drawing;
>     
>    guint x, x_end, width;
> -  LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
>      
>    TimeWindow time_window = 
>          lttvwindow_get_time_window(cfd->tab);
> @@ -749,8 +746,6 @@ void histo_drawing_destroy(histoDrawing_t *drawing)
>  
>  void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to)
>  { 
> -  
> -  HistoControlFlowData *cfd = drawing->histo_control_flow_data;
>    guint clear_width = clear_to- clear_from;
>   /* 
>    //disabled for histogram
> @@ -1107,7 +1102,7 @@ histo_expose_vertical_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer
>    GdkColor foreground = { 0, 0, 0, 0 };
>    GdkColor background = { 0, 0xffff, 0xffff, 0xffff };
>    GdkColor red ={ 0, 0xFFFF, 0x1E00, 0x1000 };
> -  GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
> +  //GdkColor magneta ={ 0, 0x8900, 0x0000, 0x8400 };
>    g_debug("vertical ruler expose event");
>   
>    gdk_draw_rectangle (drawing->vertical_ruler->window,
> diff --git a/lttv/modules/gui/histogram/histodrawing.h b/lttv/modules/gui/histogram/histodrawing.h
> index 179c92e..68fb211 100644
> --- a/lttv/modules/gui/histogram/histodrawing.h
> +++ b/lttv/modules/gui/histogram/histodrawing.h
> @@ -146,16 +146,6 @@ GtkWidget *histo_drawing_get_drawing_area(histoDrawing_t *drawing);
>  /* Clear the drawing : make it 1xwidth. */
>  void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to);
>  
> -/* Insert a square corresponding to a new process in the list */
> -static void drawing_insert_square(histoDrawing_t *drawing,
> -        guint y,
> -        guint height);
> -
> -/* Remove a square corresponding to a removed process in the list */
> -static void drawing_remove_square(histoDrawing_t *drawing,
> -        guint y,
> -        guint height);
> -
>  void histo_drawing_update_ruler(histoDrawing_t *drawing, TimeWindow *time_window);
>  
>  void histo_drawing_update_vertical_ruler(histoDrawing_t *drawing);//, TimeWindow *time_window);
> @@ -169,14 +159,6 @@ void histo_drawing_data_request_begin(EventsRequest *events_request,
>  void histo_drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss);
>  
>  
> -
> -static void
> -tree_row_activated(GtkTreeModel *treemodel,
> -                   GtkTreePath *arg1,
> -                   GtkTreeViewColumn *arg2,
> -                   gpointer user_data);
> -
> -
>  /* histo_convert_pixels_to_time
>   *
>   * Convert from window pixel and time interval to an absolute time.
> diff --git a/lttv/modules/gui/histogram/histodrawitem.c b/lttv/modules/gui/histogram/histodrawitem.c
> index 73bd3ed..d3c7d96 100644
> --- a/lttv/modules/gui/histogram/histodrawitem.c
> +++ b/lttv/modules/gui/histogram/histodrawitem.c
> @@ -111,6 +111,7 @@
>  #include <lttv/lttv.h>
>  
>  #include "histodrawitem.h"
> +#include "histodrawing.h"
>  
>  
>  #define MAX_PATH_LEN 256
> diff --git a/lttv/modules/gui/histogram/histoeventhooks.c b/lttv/modules/gui/histogram/histoeventhooks.c
> index 05ef78d..4e075c7 100644
> --- a/lttv/modules/gui/histogram/histoeventhooks.c
> +++ b/lttv/modules/gui/histogram/histoeventhooks.c
> @@ -83,93 +83,10 @@
>  // fixed #define TRACE_NUMBER 0
>  #define EXTRA_ALLOC 1024 // pixels
>  
> -/* Action to do when background computation completed.
> - *
> - * Wait for all the awaited computations to be over.
> - */
> -
> -static gint histo_background_ready(void *hook_data, void *call_data)
> -{
> -  HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData *)hook_data;
> -  LttvTrace *trace = (LttvTrace*)call_data;
> -
> -  histoDrawing_t *drawing = histocontrol_flow_data->drawing;
> -  histocontrol_flow_data->background_info_waiting--;
> -  
> -  if(histocontrol_flow_data->background_info_waiting == 0) {
> -    g_message("Histocontrol flow viewer : background computation data ready.");
> -
> -    histo_drawing_clear(drawing,0,drawing->width);
> -    
> -    gtk_widget_set_size_request(drawing->drawing_area,
> -                -1, -1);
> -    histo_redraw_notify(histocontrol_flow_data, NULL);
> -  }
> -
> -  return 0;
> -}
> -
> -
> -/* Request background computation. Verify if it is in progress or ready first.
> - * Only for each trace in the tab's traceset.
> +/* 
> + * Most functions here are inspired from the controlflow module.
> + * Look in gui/controlflow/eventhooks.c if you need to add more functionality
>   */
> -static void histo_request_background_data(HistoControlFlowData *histocontrol_flow_data)
> -{
> -  LttvTracesetContext * tsc =
> -        lttvwindow_get_traceset_context(histocontrol_flow_data->tab);
> -  gint num_traces = lttv_traceset_number(tsc->ts);
> -  gint i;
> -  LttvTrace *trace;
> -  LttvTraceState *tstate;
> -
> -  LttvHooks *histo_background_ready_hook = 
> -    lttv_hooks_new();
> -  lttv_hooks_add(histo_background_ready_hook, histo_background_ready, histocontrol_flow_data,
> -      LTTV_PRIO_DEFAULT);
> -  histocontrol_flow_data->background_info_waiting = 0;
> -  
> -  for(i=0;i<num_traces;i++) {
> -    trace = lttv_traceset_get(tsc->ts, i);
> -    tstate = LTTV_TRACE_STATE(tsc->traces[i]);
> -
> -    if(lttvwindowtraces_get_ready(g_quark_from_string("state"),trace)==FALSE
> -        && !tstate->has_precomputed_states) {
> -
> -      if(lttvwindowtraces_get_in_progress(g_quark_from_string("state"),
> -                                          trace) == FALSE) {
> -        /* We first remove requests that could have been done for the same
> -         * information. Happens when two viewers ask for it before servicing
> -         * starts.
> -         */
> -        if(!lttvwindowtraces_background_request_find(trace, "state"))
> -          lttvwindowtraces_background_request_queue(
> -              main_window_get_widget(histocontrol_flow_data->tab), trace, "state");
> -        lttvwindowtraces_background_notify_queue(histocontrol_flow_data,
> -                                                 trace,
> -                                                 ltt_time_infinite,
> -                                                 NULL,
> -                                                 histo_background_ready_hook);
> -        histocontrol_flow_data->background_info_waiting++;
> -      } else { /* in progress */
> -      
> -        lttvwindowtraces_background_notify_current(histocontrol_flow_data,
> -                                                   trace,
> -                                                   ltt_time_infinite,
> -                                                   NULL,
> -                                                   histo_background_ready_hook);
> -        histocontrol_flow_data->background_info_waiting++;
> -      }
> -    } else {
> -      /* Data ready. Be its nature, this viewer doesn't need to have
> -       * its data ready hook called there, because a background
> -       * request is always linked with a redraw.
> -       */
> -    }
> -    
> -  }
> -
> -  lttv_hooks_destroy(histo_background_ready_hook);
> -}
>  
>  /**
>   * Histogram Viewer's constructor hook
> @@ -318,7 +235,6 @@ return;
>  int histo_count_event(void *hook_data, void *call_data){
>  
>    guint x;//time to pixel
> -  guint i;// number of events
>    LttTime  event_time; 
>    LttEvent *e;
>    guint *element;
> @@ -333,7 +249,6 @@ int histo_count_event(void *hook_data, void *call_data){
>    
>     
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
>  
>    e = ltt_tracefile_get_event(tfc->tf);
>  
> @@ -425,13 +340,13 @@ void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begi
>                                 GDK_JOIN_MITER);*/
>  //clean the area!
>    histo_drawing_clear(drawing,draw_begin,draw_end);
> -  LttTime t1,t2;
> +  LttTime t1, t2;
>    TimeWindow time_window =
>                lttvwindow_get_time_window(histocontrol_flow_data->tab);
>       
> -  guint val,h_val;
> +  guint val, h_val;
>    
> -  guint i,line_src,line_end;
> +  guint i, line_src;
>    guint end_chunk=MIN(draw_end,(histocontrol_flow_data->number_of_process)->len);
>    
>    for (i=draw_begin/*0*/;i<end_chunk/* (histocontrol_flow_data->number_of_process)->len*/;i++){
> @@ -518,7 +433,6 @@ void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begi
>  
>  int histo_event_selected_hook(void *hook_data, void *call_data)
>  {
> -  HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData*) hook_data;
>    guint *event_number = (guint*) call_data;
>  
>    g_debug("DEBUG : event selected by main window : %u", *event_number);
> @@ -614,229 +528,6 @@ gint histo_update_time_window_hook(void *hook_data, void *call_data)
>  //show number of event at current time 
>  
>    histo_drawing_update_vertical_ruler(drawing);
> -
> -#if 0
> -
> -/*//  if( histo_new_time_window->time_width.tv_sec == histo_old_time_window->time_width.tv_sec
> -  && histo_new_time_window->time_width.tv_nsec == histo_old_time_window->time_width.tv_nsec)
> -  {
> -    // Same scale (scrolling) 
> -    g_info("scrolling");
> -    /* For histogram,
> -      while scrolling no matter far or near , 
> -      right or left it's necessary to redraw whole screen!*/
> -/*//    LttTime *ns = &histo_new_time_window->start_time;
> -    LttTime *nw = &histo_new_time_window->time_width;
> -    LttTime *os = &histo_old_time_window->start_time;
> -    LttTime *ow = &histo_old_time_window->time_width;
> -    LttTime histo_old_end = histo_old_time_window->end_time;
> -    LttTime histo_new_end = histo_new_time_window->end_time;
> -    //if(ns<os+w<ns+w)
> -    //if(ns<os+w && os+w<ns+w)
> -    //if(ns<histo_old_end && os<ns)
> -
> -    //added for histogram
> -    gtk_widget_queue_draw(drawing->drawing_area);
> -
> -          drawing->damage_begin = 0;
> -          drawing->damage_end = drawing->width;
> -
> -      //replaced for hisogram
> -      histo_request_event(histocontrol_flow_data,drawing->damage_begin,
> -			drawing->damage_end- drawing->damage_begin);
> -/*  
> -    if(ltt_time_compare(*ns, histo_old_end) == -1
> -        && ltt_time_compare(*os, *ns) == -1)
> -    {
> -      g_info("scrolling near right");
> -      // Scroll right, keep right part of the screen 
> -      guint x = 0;
> -      guint width = drawing->width;
> -      histo_convert_time_to_pixels(
> -          *histo_old_time_window,
> -          *ns,
> -          width,
> -          &x);
> -
> -      // Copy old data to new location 
> -      //replaced for histogram:
> -	histo_copy_pixmap_region(drawing,NULL,
> -    		drawing->drawing_area->style->black_gc,//drawing->gc,
> -	 	NULL,
> -    		x, 0,
> -    		0, 0, (drawing->width-x)
> -		, -1);
> -  
> -    if(drawing->damage_begin == drawing->damage_end)
> -        drawing->damage_begin = drawing->width-x;
> -      else
> -        drawing->damage_begin = 0;
> -
> -      drawing->damage_end = drawing->width;
> -
> -//(histo) copy corresponding array region too:
> -  guint i;
> -  
> -  for(i=0; i < histocontrol_flow_data->number_of_process->len-x;i++) 
> -  {
> -      g_array_index(histocontrol_flow_data->number_of_process, guint, i) = 
> -         g_array_index(histocontrol_flow_data->number_of_process, guint, i+x);
> -  }
> -
> -      // Clear the data request background, but not SAFETY 
> - 
> -
> -//not necessary for histo, because in before chunk ,it clears the area
> -/*	histo_rectangle_pixmap (
> -	drawing->drawing_area->style->black_gc,
> -          TRUE,
> -          drawing->damage_begin, 0,
> -          drawing->damage_end - drawing->damage_begin,  // do not overlap
> -          -1,drawing);
> -*/
> - /*     gtk_widget_queue_draw(drawing->drawing_area);
> -      //gtk_widget_queue_draw_area (drawing->drawing_area,
> -      //                          0,0,
> -      //                          histocontrol_flow_data->drawing->width,
> -      //                          histocontrol_flow_data->drawing->height);
> -
> -    // Get new data for the rest.
> -    //replaced for hisogram 
> -      histo_request_event(histocontrol_flow_data,drawing->damage_begin,
> -			drawing->damage_end- drawing->damage_begin);
> -    } else { 
> -      //if(ns<os<ns+w)
> -      //if(ns<os && os<ns+w)
> -      //if(ns<os && os<histo_new_end)
> -      if(ltt_time_compare(*ns,*os) == -1
> -          && ltt_time_compare(*os,histo_new_end) == -1)
> -      {
> -        g_info("scrolling near left");
> -        // Scroll left, keep left part of the screen 
> -        guint x = 0;
> -        guint width = drawing->width;
> -        histo_convert_time_to_pixels(
> -            *histo_new_time_window,
> -            *os,
> -            width,
> -            &x);
> -        
> -        // Copy old data to new location 
> -	//replaced for histogram
> -
> -  	histo_copy_pixmap_region(drawing,NULL,
> -    		drawing->drawing_area->style->black_gc,//drawing->gc,
> -	 	NULL,
> -    		0, 0,
> -    		x, 0, -1, -1);
> -	//(histo) copy corresponding array region too:
> -  	guint i;
> -  	for(i=histocontrol_flow_data->number_of_process->len; i > x-1;i--) 
> -  	{
> -     	 g_array_index(histocontrol_flow_data->number_of_process, guint, i) = 
> -         g_array_index(histocontrol_flow_data->number_of_process, guint, i-x);
> -  	}
> -
> -       if(drawing->damage_begin == drawing->damage_end)
> -          drawing->damage_end = x;
> -        else
> -          drawing->damage_end = 
> -            drawing->width;
> -
> -        drawing->damage_begin = 0;
> -
> -        
> -//not necessary for histo, because in before chunk ,it clears the area
> -  /*      histo_rectangle_pixmap (drawing->drawing_area->style->black_gc,
> -          TRUE,
> -          drawing->damage_begin, 0,
> -          drawing->damage_end - drawing->damage_begin,  // do not overlap
> -          -1,drawing);
> -*/
> - /*       gtk_widget_queue_draw(drawing->drawing_area);
> -        //gtk_widget_queue_draw_area (drawing->drawing_area,
> -        //                        0,0,
> -        //                        histocontrol_flow_data->drawing->width,
> -        //                        histocontrol_flow_data->drawing->height);
> -
> -
> -        // Get new data for the rest. 
> -
> -//replaced for hisogram
> -      histo_request_event(histocontrol_flow_data,drawing->damage_begin,
> -			drawing->damage_end- drawing->damage_begin);
> -    
> -      } else {
> -        if(ltt_time_compare(*ns,*os) == 0)
> -        {
> -          g_info("not scrolling");
> -        } else {
> -          g_info("scrolling far");
> -          // Cannot reuse any part of the screen : far jump 
> -          
> -          //not necessary for histo, because in before chunk ,it clears the area
> - /*         histo_rectangle_pixmap (histocontrol_flow_data->drawing->drawing_area->style->black_gc,
> -            TRUE,
> -            0, 0,
> -            histocontrol_flow_data->drawing->width,//+SAFETY, // do not overlap
> -            -1,drawing);
> -*/
> -          //gtk_widget_queue_draw_area (drawing->drawing_area,
> -          //                      0,0,
> -          //                      histocontrol_flow_data->drawing->width,
> -          //                      histocontrol_flow_data->drawing->height);
> -/*          gtk_widget_queue_draw(drawing->drawing_area);
> -
> -          drawing->damage_begin = 0;
> -          drawing->damage_end = histocontrol_flow_data->drawing->width;
> -/*
> -          histo_drawing_data_request(histocontrol_flow_data->drawing,
> -              0, 0,
> -              histocontrol_flow_data->drawing->width,
> -              histocontrol_flow_data->drawing->height);*/
> -      //replaced for hisogram
> - /*     histo_request_event(histocontrol_flow_data,drawing->damage_begin,
> -			drawing->damage_end- drawing->damage_begin);
> -        }
> -      }
> -    }
> -  } else {
> -    // Different scale (zoom) 
> -    g_info("zoom");
> -
> - //not necessary for histo, because in before chunk ,it clears the area
> - /*
> -    histo_rectangle_pixmap (drawing->drawing_area->style->black_gc,
> -          TRUE,
> -          0, 0,
> -          histocontrol_flow_data->drawing->width+SAFETY, // do not overlap
> -          -1,drawing);
> -*/
> -    //gtk_widget_queue_draw_area (drawing->drawing_area,
> -    //                            0,0,
> -    //                            histocontrol_flow_data->drawing->width,
> -    //                            histocontrol_flow_data->drawing->height);
> -/*//    gtk_widget_queue_draw(drawing->drawing_area);
> -  
> -    drawing->damage_begin = 0;
> -    drawing->damage_end = drawing->width;
> -
> -  //replaced for hisogram
> -   histo_request_event(histocontrol_flow_data,drawing->damage_begin,
> -			drawing->damage_end- drawing->damage_begin);
> -  }
> -
> -  // Update directly when scrolling 
> -  gdk_window_process_updates(drawing->drawing_area->window,
> -      TRUE);
> -
> -  //show number of event at current time 
> -
> -  histo_drawing_update_vertical_ruler(drawing);
> -*/
> -#endif
> -
> -//disabled for histogram, always redraw whole screen. 
>    return 0;
>  }
>  
> @@ -1019,9 +710,6 @@ gboolean histo_filter_changed(void * hook_data, void * call_data)
>    HistoControlFlowData *histocontrol_flow_data = (HistoControlFlowData*)hook_data;
>    histoDrawing_t *drawing =histocontrol_flow_data->drawing;
>  
> -  LttvTracesetContext * tsc =
> -        lttvwindow_get_traceset_context(histocontrol_flow_data->tab);
> -
>    histocontrol_flow_data->histo_main_win_filter = 
>      (LttvFilter*)call_data;
>    //get_events(event_viewer_data->vadjust_c->value, event_viewer_data);
> @@ -1057,7 +745,6 @@ int histo_before_chunk(void *hook_data, void *call_data)
>  {
>    EventsRequest *histo_events_request = (EventsRequest*)hook_data;
>    LttvTracesetState *histo_tss = (LttvTracesetState*)call_data;
> -  HistoControlFlowData *histo_cfd = (HistoControlFlowData*)histo_events_request->viewer_data;
>  #if 0  
>    /* Desactivate sort */
>    gtk_tree_sortable_set_sort_column_id(
> @@ -1106,7 +793,6 @@ int histo_after_chunk(void *hook_data, void *call_data)
>  {
>    EventsRequest *events_request = (EventsRequest*)hook_data;
>    HistoControlFlowData *histocontrol_flow_data = events_request->viewer_data;
> -  LttvTracesetState *tss = (LttvTracesetState*)call_data;
>    LttvTracesetContext *tsc = (LttvTracesetContext*)call_data;
>    LttvTracefileContext *tfc = lttv_traceset_context_get_current_tfc(tsc);
>    LttTime end_time;
> diff --git a/lttv/modules/gui/interrupts/interrupts.c b/lttv/modules/gui/interrupts/interrupts.c
> index bea4a10..4197565 100644
> --- a/lttv/modules/gui/interrupts/interrupts.c
> +++ b/lttv/modules/gui/interrupts/interrupts.c
> @@ -241,8 +241,6 @@ static GtkWidget *interrupts(LttvPlugin *plugin)
>   */
>  InterruptEventData *system_info(LttvPluginTab *ptab)
>  {
> -  
> -  LttTime end;
>    GtkTreeViewColumn *column;
>    GtkCellRenderer *renderer;
>    InterruptEventData* event_viewer_data = g_new(InterruptEventData,1) ;
> @@ -420,23 +418,13 @@ InterruptEventData *system_info(LttvPluginTab *ptab)
>   */
>  static void FirstRequest(InterruptEventData *event_data )
>  {
> -  guint i, k, l, nb_trace;
> - 
> -  LttvTraceHook *hook;
> -   
> -  guint ret; 
> -  
> +  guint i, k, nb_trace;
>    LttvTraceState *ts;
> -    
>    GArray *hooks;
> -   
>    EventsRequest *events_request;
> -  
>    LttvTraceHook *th;
> -  
>    LttvTracesetContext *tsc = lttvwindow_get_traceset_context(event_data->tab);
> -  
> -  
> +
>    /* Get the traceset */
>    LttvTraceset *traceset = tsc->ts;
>   
> @@ -580,9 +568,8 @@ gboolean FirstRequestIrqExitCallback(void *hook_data, void *call_data)
>  static void CalculateData(LttTime time_exit,  guint cpu_id,InterruptEventData *event_data)
>  {
>    
> -  gint i, irq_id;
> +  gint i;
>    irq_entry *element; 
> -  LttTime duration;
>    GArray *FirstRequestIrqExit = event_data->FirstRequestIrqExit;
>    GArray *FirstRequestIrqEntry = event_data->FirstRequestIrqEntry;
>    for(i = FirstRequestIrqEntry->len-1; i >=0; i--)
> @@ -682,25 +669,14 @@ static void CalculateTotalDurationAndMaxIrqDurationAndMinIrqDuration(irq_entry *
>   */ 
>  static gboolean SecondRequest(void *hook_data, void *call_data)
>  {
> - 
> -  guint i, k, l, nb_trace;
> - 
> -  LttvTraceHook *hook;
> -   
> +  guint i, k, nb_trace;
>    guint ret; 
> -  
>    LttvTraceState *ts;
> -    
>    GArray *hooks;
> -   
>    EventsRequest *events_request;
> -  
>    LttvTraceHook *th;
> -  
>    InterruptEventData *event_data = (InterruptEventData *)hook_data;
> -  
>    LttvTracesetContext *tsc = lttvwindow_get_traceset_context(event_data->tab);
> -  
>    CalculateAverageDurationForEachIrqId(event_data);
>     
>    /* Get the traceset */
> @@ -870,7 +846,6 @@ static void CalculateXi(LttEvent *event_irq_exit, InterruptEventData *event_data
>    LttTime Xi;
>    LttTime  exit_time; 
>    
> -  GArray *SecondRequestIrqExit = event_data->SecondRequestIrqExit;
>    GArray *SecondRequestIrqEntry = event_data->SecondRequestIrqEntry;
>    for(i = 0; i < SecondRequestIrqEntry->len; i++)
>    {
> @@ -1004,11 +979,8 @@ static  guint64 CalculateFrequencyInnerPart(guint Xi_in_ns,  guint FrequencyHZ)
>   */ 
>  static gboolean DisplayViewer(void *hook_data, void *call_data)
>  {
> -  
> -  guint average;
>    gint i;	
>    Irq element; 
> -  LttTime average_duration;
>    GtkTreeIter    iter;
>    guint64 real_data;
>    guint maxIRQduration;
> @@ -1048,13 +1020,13 @@ static gboolean DisplayViewer(void *hook_data, void *call_data)
>      
>      FrequencyHZ = FrequencyInHZ(element.TotalNumberOfInterrupts,event_data->time_window);
>     
> -   if(FrequencyHZ != 0)
> -   {
> +    if(FrequencyHZ != 0)
> +    {
>        periodInSec = (double)1/FrequencyHZ;
>        periodInSec *= NANOSECONDS_PER_SECOND;
>        periodInNsec = (int)periodInSec;
>       
> -   }
> +    }
>       
>      gtk_list_store_append (event_data->ListStore, &iter);
>      gtk_list_store_set (event_data->ListStore, &iter,
> @@ -1231,18 +1203,12 @@ gboolean interrupt_update_time_window(void * hook_data, void * call_data)
>  
>  gboolean trace_header(void *hook_data, void *call_data)
>  {
> -
> -  InterruptEventData *event_data = (InterruptEventData *)hook_data;
> -  LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
> -  LttEvent *e;
> -  LttTime event_time;
>    return FALSE;
>  }
>  
>  void interrupt_destroy_walk(gpointer data, gpointer user_data)
>  {
>    g_info("interrupt_destroy_walk");
> -  InterruptEventData *event_data = (InterruptEventData*) data;
>    interrupt_destructor((InterruptEventData*)data);
>  }
>  
> diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
> index 1229688..87d9ca8 100644
> --- a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
> +++ b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
> @@ -418,10 +418,8 @@ insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data)
>  void insert_viewer(GtkWidget* widget, lttvwindow_viewer_constructor constructor)
>  {
>    GtkWidget * viewer_container;
> -  MainWindow * mw_data = get_window_data_struct(widget);
>    GtkWidget * notebook = lookup_widget(widget, "MNotebook");
>    GtkWidget * viewer;
> -  TimeInterval * time_interval;
>    GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
>                        gtk_notebook_get_current_page(GTK_NOTEBOOK(notebook)));
>    LttvPluginTab *ptab;
> @@ -814,7 +812,6 @@ gint viewer_container_position(GtkWidget *container, GtkWidget *child)
>  
>  void move_down_viewer(GtkWidget * widget, gpointer user_data)
>  {
> -  MainWindow * mw = get_window_data_struct(widget);
>    GtkWidget * notebook = lookup_widget(widget, "MNotebook");
>  
>    GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
> @@ -848,7 +845,6 @@ void move_down_viewer(GtkWidget * widget, gpointer user_data)
>  
>  void move_up_viewer(GtkWidget * widget, gpointer user_data)
>  {
> -  MainWindow * mw = get_window_data_struct(widget);
>    GtkWidget * notebook = lookup_widget(widget, "MNotebook");
>  
>    GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
> @@ -889,7 +885,6 @@ void move_up_viewer(GtkWidget * widget, gpointer user_data)
>  
>  void delete_viewer(GtkWidget * widget, gpointer user_data)
>  {
> -  MainWindow * mw = get_window_data_struct(widget);
>    GtkWidget * notebook = lookup_widget(widget, "MNotebook");
>  
>    GtkWidget *page = gtk_notebook_get_nth_page(GTK_NOTEBOOK(notebook),
> @@ -983,7 +978,6 @@ void open_traceset(GtkWidget * widget, gpointer user_data)
>  
>  gboolean lttvwindow_process_pending_requests(Tab *tab)
>  {
> -  GtkWidget* widget;
>    LttvTracesetContext *tsc;
>    LttvTracefileContext *tfc;
>    GSList *list_in = NULL;
> @@ -1957,7 +1951,7 @@ void remove_trace(GtkWidget *widget, gpointer user_data)
>    for(i = 0; i < nb_trace; i++){
>      trace_v = lttv_traceset_get(tab->traceset_info->traceset, i);
>      trace = lttv_trace(trace_v);
> -    name[i] = g_quark_to_string(ltt_trace_name(trace));
> +    name[i] = (char *) g_quark_to_string(ltt_trace_name(trace));
>    }
>  
>    remove_trace_name = get_remove_trace(mw_data, name, nb_trace);
> @@ -2275,7 +2269,6 @@ void zoom(GtkWidget * widget, double size)
>    TimeInterval time_span;
>    TimeWindow new_time_window;
>    LttTime    current_time, time_delta;
> -  MainWindow * mw_data = get_window_data_struct(widget);
>    LttvTracesetContext *tsc;
>    GtkWidget * notebook = lookup_widget(widget, "MNotebook");
>  
> @@ -2478,8 +2471,6 @@ on_close_tab_activate                  (GtkWidget       *widget,
>  {
>    gint page_num;
>    GtkWidget * notebook;
> -  GtkWidget * page;
> -  MainWindow * mw_data = get_window_data_struct(widget);
>    notebook = lookup_widget(widget, "MNotebook");
>    if(notebook == NULL){
>      g_info("Notebook does not exist\n");
> @@ -2966,7 +2957,6 @@ void
>  on_unload_module_activate              (GtkMenuItem     *menuitem,
>                                          gpointer         user_data)
>  {
> -  GError *error = NULL;
>    MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem);
>  
>    LttvLibrary *library = NULL;
> @@ -3096,7 +3086,6 @@ on_remove_library_search_path_activate     (GtkMenuItem     *menuitem,
>    {
>      GPtrArray *name;
>      guint nb,i;
> -    gchar *lib_name;
>      name = g_ptr_array_new();
>      nb = lttv_library_path_number();
>      /* ask for the library name */
> @@ -3407,8 +3396,6 @@ on_MWindow_configure                   (GtkWidget         *widget,
>                                          GdkEventConfigure *event,
>                                          gpointer           user_data)
>  {
> -  MainWindow * mw_data = get_window_data_struct((GtkWidget*)widget);
> -	
>  	// MD : removed time width modification upon resizing of the main window.
>  	// The viewers will redraw themselves completely, without time interval
>  	// modification.
> @@ -3987,7 +3974,6 @@ void current_position_change_manager(Tab *tab,
>  {
>    LttvTracesetContext *tsc =
>      LTTV_TRACESET_CONTEXT(tab->traceset_info->traceset_context);
> -  TimeInterval time_span = tsc->time_span;
>    int retval;
>  
>    retval= lttv_process_traceset_seek_position(tsc, pos);
> diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/interface.c b/lttv/modules/gui/lttvwindow/lttvwindow/interface.c
> index 007b33e..6d87df2 100644
> --- a/lttv/modules/gui/lttvwindow/lttvwindow/interface.c
> +++ b/lttv/modules/gui/lttvwindow/lttvwindow/interface.c
> @@ -133,7 +133,6 @@ create_MWindow (void)
>    GtkWidget *tlbMoveViewerUp;
>    GtkWidget *tlbMoveViewerDown;
>    GtkWidget *tlbRemoveViewer;
> -  GtkWidget *MToolbar2;
>    GtkWidget *MNotebook;
>    //  GtkWidget *empty_notebook_page;
>    //  GtkWidget *label1;
> diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin.c b/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin.c
> index f7b4ded..a26eed9 100644
> --- a/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin.c
> +++ b/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin.c
> @@ -32,9 +32,9 @@ lttv_plugin_class_init (LttvPluginClass *klass)
>  }
>  
>  static void
> -lttv_plugin_instance_init (GTypeInstance *instance, gpointer g_class)
> +lttv_plugin_init (GTypeInstance *instance, gpointer g_class)
>  {
> -  LttvPlugin *self;
> +  LttvPlugin *self = LTTV_PLUGIN (instance);
>    self->top_widget = NULL;
>  }
>  
> @@ -47,12 +47,12 @@ lttv_plugin_get_type (void)
>        sizeof (LttvPluginClass),
>        NULL,   /* base_init */
>        NULL,   /* base_finalize */
> -      lttv_plugin_class_init,   /* class_init */
> +      (GClassInitFunc) lttv_plugin_class_init,   /* class_init */
>        NULL,   /* class_finalize */
>        NULL,   /* class_data */
>        sizeof (LttvPlugin),
>        0,      /* n_preallocs */
> -      NULL    /* instance_init */
> +      lttv_plugin_init    /* instance_init */
>        };
>        type = g_type_register_static (G_TYPE_OBJECT,
>                                       "LttvPluginType",
> diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin_tab.c b/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin_tab.c
> index 2e64138..7059176 100644
> --- a/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin_tab.c
> +++ b/lttv/modules/gui/lttvwindow/lttvwindow/lttv_plugin_tab.c
> @@ -66,7 +66,7 @@ lttv_plugin_tab_get_type (void)
>        sizeof (LttvPluginTabClass),
>        NULL,   /* base_init */
>        NULL,   /* base_finalize */
> -      lttv_plugin_tab_class_init,   /* class_init */
> +      (GClassInitFunc) lttv_plugin_tab_class_init,   /* class_init */
>        NULL,   /* class_finalize */
>        NULL,   /* class_data */
>        sizeof (LttvPluginTab),
> diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
> index d486020..ee3f924 100644
> --- a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
> +++ b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c
> @@ -127,7 +127,9 @@ void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos)
>      "hooks/updatecurrentposition", LTTV_POINTER, &value);
>    g_assert(retval);
>    tmp = (LttvHooks*)*(value.v_pointer);
> -  if(tmp != NULL) lttv_hooks_call(tmp, pos);
> +  if (tmp != NULL) {
> +    lttv_hooks_call(tmp, (void *) pos);
> +  }
>  }
>  
>  void add_toolbar_constructor(MainWindow *mw, LttvToolbarClosure *toolbar_c)
> diff --git a/lttv/modules/gui/resourceview/cfv.c b/lttv/modules/gui/resourceview/cfv.c
> index 183be8b..d924331 100644
> --- a/lttv/modules/gui/resourceview/cfv.c
> +++ b/lttv/modules/gui/resourceview/cfv.c
> @@ -83,16 +83,6 @@ gboolean cfv_scroll_event(GtkWidget *widget, GdkEventScroll *event,
>  }
>  
>  
> -/* Toolbar callbacks */
> -static void        property_button      (GtkToolButton *toolbutton,
> -                                          gpointer       user_data)
> -{
> -  ControlFlowData *control_flow_data = (ControlFlowData*)user_data;
> -
> -  g_printf("CFV Property button clicked\n");
> -
> -}
> -
>  /*****************************************************************************
>   *                     Control Flow Viewer class implementation              *
>   *****************************************************************************/
> @@ -107,12 +97,8 @@ static void        property_button      (GtkToolButton *toolbutton,
>  ControlFlowData *
>  resourceview(LttvPluginTab *ptab)
>  {
> -  Tab *tab = ptab->tab;
> -  GtkWidget *tmp_toolbar_icon;
>    GtkWidget *process_list_widget, *drawing_widget, *drawing_area;
> -  //ControlFlowData* control_flow_data = g_new(ControlFlowData,1) ;
>    LttvPluginCFV *plugin_cfv = g_object_new(LTTV_TYPE_PLUGIN_CFV, NULL);
> -  GtkTooltips *tooltips = gtk_tooltips_new();
>    ControlFlowData* control_flow_data = plugin_cfv->cfd;
>    control_flow_data->ptab = ptab;
>    control_flow_data->tab = ptab->tab;
> diff --git a/lttv/modules/gui/resourceview/drawing.c b/lttv/modules/gui/resourceview/drawing.c
> index 033475a..7e324d7 100644
> --- a/lttv/modules/gui/resourceview/drawing.c
> +++ b/lttv/modules/gui/resourceview/drawing.c
> @@ -186,25 +186,15 @@ void drawing_data_request(Drawing_t *drawing,
>    {
>      /* find the tracehooks */
>      LttvTracesetContext *tsc = lttvwindow_get_traceset_context(tab);
> -
>      LttvTraceset *traceset = tsc->ts;
> -
> -    guint i, k, l, nb_trace;
> -
>      LttvTraceState *ts;
> -
> -    LttvTracefileState *tfs;
> -
>      GArray *hooks;
> -
> -    LttvTraceHook *hook;
> -
>      LttvTraceHook *th;
>  
> -    guint ret;
> +    guint i, k;
>      guint first_after;
>  
> -    nb_trace = lttv_traceset_number(traceset);
> +    guint nb_trace = lttv_traceset_number(traceset);
>      // FIXME  (fixed) : eventually request for more traces
>      for(i = 0 ; i < nb_trace ; i++) {
>        EventsRequest *events_request = g_new(EventsRequest, 1);
> @@ -536,7 +526,6 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState
>  
>    g_debug("Begin of data request");
>    ControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = LTTV_TRACESET_CONTEXT(tss);
>    TimeWindow time_window = 
>      lttvwindow_get_time_window(cfd->tab);
>  
> @@ -563,7 +552,6 @@ void drawing_chunk_begin(EventsRequest *events_request, LttvTracesetState *tss)
>    g_debug("Begin of chunk");
>    ControlFlowData *cfd = events_request->viewer_data;
>    LttvTracesetContext *tsc = &tss->parent;
> -  //LttTime current_time = lttv_traceset_context_get_current_tfc(tsc)->timestamp;
>    guint i;
>    LttvTraceset *traceset = tsc->ts;
>    guint nb_trace = lttv_traceset_number(traceset);
> @@ -590,7 +578,6 @@ void drawing_request_expose(EventsRequest *events_request,
>    guint x_end;
>  
>    ControlFlowData *cfd = events_request->viewer_data;
> -  LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
>    Drawing_t *drawing = cfd->drawing;
>    
>    TimeWindow time_window = 
> diff --git a/lttv/modules/gui/resourceview/eventhooks.c b/lttv/modules/gui/resourceview/eventhooks.c
> index 271e8d2..1edf049 100644
> --- a/lttv/modules/gui/resourceview/eventhooks.c
> +++ b/lttv/modules/gui/resourceview/eventhooks.c
> @@ -255,7 +255,6 @@ h_legend(LttvPlugin *plugin)
>  
>  int event_selected_hook(void *hook_data, void *call_data)
>  {
> -  ControlFlowData *resourceview_data = (ControlFlowData*) hook_data;
>    guint *event_number = (guint*) call_data;
>  
>    g_debug("DEBUG : event selected by main window : %u", *event_number);
> @@ -312,7 +311,6 @@ static void irq_set_line_color(PropertiesLine *prop_line, LttvIRQState *s)
>  
>  static void soft_irq_set_line_color(PropertiesLine *prop_line, LttvSoftIRQState *s)
>  {
> -  GQuark present_state;
>    if(s->running)
>      prop_line->color = drawing_colors_soft_irq[COL_SOFT_IRQ_BUSY];
>    else if(s->pending)
> @@ -323,7 +321,6 @@ static void soft_irq_set_line_color(PropertiesLine *prop_line, LttvSoftIRQState
>  
>  static void trap_set_line_color(PropertiesLine *prop_line, LttvTrapState *s)
>  {
> -  GQuark present_state;
>    if(s->running == 0)
>      prop_line->color = drawing_colors_trap[COL_TRAP_IDLE];
>    else
> @@ -383,10 +380,8 @@ int before_schedchange_hook(void *hook_data, void *call_data)
>  
>    LttEvent *e;
>    e = ltt_tracefile_get_event(tfc->tf);
> -  gint target_pid_saved = tfc->target_pid;
>  
>    LttTime evtime = ltt_event_time(e);
> -  LttvFilter *filter = resourceview_data->filter;
>  
>    /* we are in a schedchange, before the state update. We must draw the
>     * items corresponding to the state before it changes : now is the right
> @@ -408,10 +403,8 @@ int before_schedchange_hook(void *hook_data, void *call_data)
>    guint cpu = tfs->cpu;
>  
>    guint trace_num = ts->parent.index;
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
> -  ProcessList *process_list = resourceview_data->process_list;
>    
>    hashed_process_data = resourcelist_obtain_cpu(resourceview_data, trace_num, cpu);
>    
> @@ -559,7 +552,6 @@ int after_schedchange_hook(void *hook_data, void *call_data)
>    /* Add process to process list (if not present) */
>    LttvProcessState *process_in;
>    LttTime birth;
> -  guint pl_height = 0;
>    HashedResourceData *hashed_process_data_in = NULL;
>  
>    ProcessList *process_list = resourceview_data->process_list;
> @@ -676,12 +668,9 @@ int before_execmode_hook(void *hook_data, void *call_data)
>    /* Well, the process_out existed : we must get it in the process hash
>     * or add it, and draw its items.
>     */
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
>    ProcessList *process_list = resourceview_data->process_list;
> -
> -  LttTime birth = process->creation_time;
>   
>    if(likely(process_list->current_hash_data[trace_num][cpu] != NULL)) {
>      hashed_process_data = process_list->current_hash_data[trace_num][cpu];
> @@ -824,8 +813,6 @@ int before_execmode_hook_irq(void *hook_data, void *call_data)
>  
>    LttTime evtime = ltt_event_time(e);
>  
> -  LttTrace *trace = tfc->t_context->t;
> -
>    /* we are in a execmode, before the state update. We must draw the
>     * items corresponding to the state before it changes : now is the right
>     * time to do it.
> @@ -861,10 +848,8 @@ int before_execmode_hook_irq(void *hook_data, void *call_data)
>    /* Well, the process_out existed : we must get it in the process hash
>     * or add it, and draw its items.
>     */
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
> -  ProcessList *process_list = resourceview_data->process_list;
>  
>    hashed_process_data = resourcelist_obtain_irq(resourceview_data, trace_num, irq);
>    // TODO: fix this, it's ugly and slow:
> @@ -1009,8 +994,6 @@ int before_execmode_hook_soft_irq(void *hook_data, void *call_data)
>  
>    LttTime evtime = ltt_event_time(e);
>  
> -  LttTrace *trace = tfc->t_context->t;
> -
>    /* we are in a execmode, before the state update. We must draw the
>     * items corresponding to the state before it changes : now is the right
>     * time to do it.
> @@ -1048,10 +1031,8 @@ int before_execmode_hook_soft_irq(void *hook_data, void *call_data)
>    /* Well, the process_out existed : we must get it in the process hash
>     * or add it, and draw its items.
>     */
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
> -  ProcessList *process_list = resourceview_data->process_list;
>  
>    hashed_process_data = resourcelist_obtain_soft_irq(resourceview_data, trace_num, softirq);
>  
> @@ -1186,8 +1167,6 @@ int before_execmode_hook_trap(void *hook_data, void *call_data)
>  
>    LttTime evtime = ltt_event_time(e);
>  
> -  LttTrace *trace = tfc->t_context->t;
> -
>    /* we are in a execmode, before the state update. We must draw the
>     * items corresponding to the state before it changes : now is the right
>     * time to do it.
> @@ -1228,10 +1207,8 @@ int before_execmode_hook_trap(void *hook_data, void *call_data)
>    /* Well, the process_out existed : we must get it in the process hash
>     * or add it, and draw its items.
>     */
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
> -  ProcessList *process_list = resourceview_data->process_list;
>  
>    hashed_process_data = resourcelist_obtain_trap(resourceview_data, trace_num, trap);
>  
> @@ -1358,7 +1335,6 @@ int before_bdev_event_hook(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
>    LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
>  
>    LttEvent *e;
> @@ -1372,10 +1348,8 @@ int before_bdev_event_hook(void *hook_data, void *call_data)
>     */
>    /* For the pid */
>  
> -  guint cpu = tfs->cpu;
>    guint8 major = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
>    guint8 minor = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
> -  guint oper = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 2));
>    gint devcode_gint = MKDEV(major,minor);
>  
>    guint trace_num = ts->parent.index;
> @@ -1387,10 +1361,8 @@ int before_bdev_event_hook(void *hook_data, void *call_data)
>    /* Well, the process_out existed : we must get it in the process hash
>     * or add it, and draw its items.
>     */
> -   /* Add process to process list (if not present) */
> -  guint pl_height = 0;
> +  /* Add process to process list (if not present) */
>    HashedResourceData *hashed_process_data = NULL;
> -  ProcessList *process_list = resourceview_data->process_list;
>  //  LttTime birth = process->creation_time;
>   
>  //  if(likely(process_list->current_hash_data[trace_num][cpu] != NULL)) {
> @@ -1567,9 +1539,7 @@ gint update_time_window_hook(void *hook_data, void *call_data)
>      /* Same scale (scrolling) */
>      g_info("scrolling");
>      LttTime *ns = &new_time_window->start_time;
> -    LttTime *nw = &new_time_window->time_width;
>      LttTime *os = &old_time_window->start_time;
> -    LttTime *ow = &old_time_window->time_width;
>      LttTime old_end = old_time_window->end_time;
>      LttTime new_end = new_time_window->end_time;
>      //if(ns<os+w<ns+w)
> @@ -1806,7 +1776,6 @@ gint continue_notify(void *hook_data, void *call_data)
>  gint update_current_time_hook(void *hook_data, void *call_data)
>  {
>    ControlFlowData *resourceview_data = (ControlFlowData*)hook_data;
> -  Drawing_t *drawing = resourceview_data->drawing;
>  
>    LttTime current_time = *((LttTime*)call_data);
>    
> @@ -1928,7 +1897,6 @@ void draw_closure(gpointer key, gpointer value, gpointer user_data)
>  
>      /* Only draw for processes that are currently in the trace states */
>  
> -    ProcessList *process_list = resourceview_data->process_list;
>  #ifdef EXTRA_CHECK
>      /* Should be alike when background info is ready */
>      if(resourceview_data->background_info_waiting==0)
> @@ -2049,7 +2017,6 @@ int before_chunk(void *hook_data, void *call_data)
>  {
>    EventsRequest *events_request = (EventsRequest*)hook_data;
>    LttvTracesetState *tss = (LttvTracesetState*)call_data;
> -  ControlFlowData *cfd = (ControlFlowData*)events_request->viewer_data;
>  #if 0  
>    /* Deactivate sort */
>    gtk_tree_sortable_set_sort_column_id(
> @@ -2094,7 +2061,6 @@ int after_request(void *hook_data, void *call_data)
>    ControlFlowData *resourceview_data = events_request->viewer_data;
>    LttvTracesetState *tss = (LttvTracesetState*)call_data;
>    
> -  ProcessList *process_list = resourceview_data->process_list;
>    LttTime end_time = events_request->end_time;
>  
>    ClosureData closure_data;
> @@ -2211,12 +2177,7 @@ int before_statedump_end(void *hook_data, void *call_data)
>  
>    LttvTracefileContext *tfc = (LttvTracefileContext *)call_data;
>  
> -  LttvTracefileState *tfs = (LttvTracefileState *)call_data;
> -
> -  LttvTraceState *ts = (LttvTraceState *)tfc->t_context;
> -
>    LttvTracesetState *tss = (LttvTracesetState*)tfc->t_context->ts_context;
> -  ProcessList *process_list = resourceview_data->process_list;
>  
>    LttEvent *e;
>    e = ltt_tracefile_get_event(tfc->tf);
> diff --git a/lttv/modules/gui/resourceview/lttv_plugin_cfv.c b/lttv/modules/gui/resourceview/lttv_plugin_cfv.c
> index 4b5ae2c..b9ab49f 100644
> --- a/lttv/modules/gui/resourceview/lttv_plugin_cfv.c
> +++ b/lttv/modules/gui/resourceview/lttv_plugin_cfv.c
> @@ -68,7 +68,7 @@ lttv_plugin_cfv_get_type (void)
>        sizeof (LttvPluginCFVClass),
>        NULL,   /* base_init */
>        NULL,   /* base_finalize */
> -      lttv_plugin_cfv_class_init,   /* class_init */
> +      (GClassInitFunc) lttv_plugin_cfv_class_init,   /* class_init */
>        NULL,   /* class_finalize */
>        NULL,   /* class_data */
>        sizeof (LttvPluginCFV),
> diff --git a/lttv/modules/gui/resourceview/processlist.c b/lttv/modules/gui/resourceview/processlist.c
> index ee24ba6..00d200c 100644
> --- a/lttv/modules/gui/resourceview/processlist.c
> +++ b/lttv/modules/gui/resourceview/processlist.c
> @@ -87,9 +87,8 @@ gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
>        (ControlFlowData*)g_object_get_data(
>                  G_OBJECT(widget),
>                  "resourceview_data");
> -  Drawing_t *drawing = control_flow_data->drawing;
> -	unsigned int cell_height =
> -		get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
> +  unsigned int cell_height =
> +      get_cell_height(GTK_TREE_VIEW(control_flow_data->process_list->process_list_widget));
>  
>    switch(event->direction) {
>      case GDK_SCROLL_UP:
> @@ -103,7 +102,7 @@ gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
>      default:
>        g_error("should only scroll up and down.");
>    }
> -	return TRUE;
> +  return TRUE;
>  }
>  
>  void expand_event(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *arg2, gpointer user_data)
> @@ -113,7 +112,6 @@ void expand_event(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *arg2, g
>                  G_OBJECT(treeview),
>                  "resourceview_data");
>    ProcessList *process_list = (ProcessList *) user_data;
> -  ResourceUnique *rup;
>    HashedResourceData *hrd;
>    gboolean result;
>  
> @@ -148,7 +146,6 @@ void collapse_event(GtkTreeView *treeview, GtkTreeIter *iter, GtkTreePath *arg2,
>                  G_OBJECT(treeview),
>                  "resourceview_data");
>    ProcessList *process_list = (ProcessList *) user_data;
> -  ResourceUnique *rup;
>    HashedResourceData *hrd;
>    gboolean result;
>  
> diff --git a/lttv/modules/gui/statistics/statistics.c b/lttv/modules/gui/statistics/statistics.c
> index 3f5c51d..2b40d6b 100644
> --- a/lttv/modules/gui/statistics/statistics.c
> +++ b/lttv/modules/gui/statistics/statistics.c
> @@ -131,7 +131,6 @@ static gint background_ready(void *hook_data, void *call_data)
>  {
>    StatisticViewerData *svd = (StatisticViewerData *)hook_data;
>    Tab *tab = svd->tab;
> -  LttvTrace *trace = (LttvTrace*)call_data;
>  
>    svd->background_info_waiting--;
>  
> @@ -431,7 +430,6 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data)
>    int i, nb;
>    LttvTraceset *ts;
>    LttvTraceStats *tcs;
> -  LttSystemDescription *desc;
>    LttvTracesetStats * tscs = lttvwindow_get_traceset_stats(tab);
>    gchar * str, trace_str[PATH_LENGTH];
>    GtkTreePath * path;
> @@ -468,7 +466,7 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data)
>              start_time.tv_sec,
>              start_time.tv_nsec);
>  #endif //0
> -    sprintf(trace_str, g_quark_to_string(ltt_trace_name(tcs->parent.parent.t)));
> +    sprintf(trace_str, "%s", g_quark_to_string(ltt_trace_name(tcs->parent.parent.t)));
>      gtk_tree_store_append (store, &iter, NULL);  
>      gtk_tree_store_set (store, &iter,NAME_COLUMN,trace_str,-1);  
>      path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
> diff --git a/lttv/modules/gui/tracecontrol/tracecontrol.c b/lttv/modules/gui/tracecontrol/tracecontrol.c
> index 283674b..a02301b 100644
> --- a/lttv/modules/gui/tracecontrol/tracecontrol.c
> +++ b/lttv/modules/gui/tracecontrol/tracecontrol.c
> @@ -164,10 +164,6 @@ gui_control(LttvPluginTab *ptab)
>    Tab *tab = ptab->tab;
>    g_debug("filter::gui_control()");
>  
> -  unsigned i;
> -  GtkCellRenderer *renderer;
> -  GtkTreeViewColumn *column;
> -
>    ControlData* tcd = g_new(ControlData,1);
>  
>    tcd->tab  = tab;
> @@ -450,8 +446,6 @@ gui_control(LttvPluginTab *ptab)
>  void
>  gui_control_destructor(ControlData *tcd)
>  {
> -  Tab *tab = tcd->tab;
> -
>    /* May already been done by GTK window closing */
>    if(GTK_IS_WIDGET(guicontrol_get_widget(tcd))){
>      g_info("widget still exists");
> @@ -850,7 +844,7 @@ void start_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>    }
> @@ -922,7 +916,7 @@ void pause_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>    }
> @@ -993,7 +987,7 @@ void unpause_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>    }
> @@ -1024,10 +1018,10 @@ void stop_clicked (GtkButton *button, gpointer user_data)
>   
>    const gchar *lttctl_path =
>      gtk_entry_get_text(GTK_ENTRY(tcd->lttctl_path_entry));
> -  gchar *trace_dir = gtk_entry_get_text(GTK_ENTRY(tcd->trace_dir_entry));
> +  const gchar *trace_dir = gtk_entry_get_text(GTK_ENTRY(tcd->trace_dir_entry));
>    GSList * trace_list = NULL;
>  
> -  trace_list = g_slist_append(trace_list, trace_dir);
> +  trace_list = g_slist_append(trace_list, (gpointer) trace_dir);
>  
>    /* Setup arguments to su */
>    /* child */
> @@ -1092,7 +1086,7 @@ void stop_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>      return;
> @@ -1176,7 +1170,7 @@ void arm_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>    }
> @@ -1227,7 +1221,7 @@ void disarm_clicked (GtkButton *button, gpointer user_data)
>          GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
>          GTK_MESSAGE_ERROR,
>          GTK_BUTTONS_OK,
> -        msg);
> +        "%s", msg);
>      gtk_dialog_run(GTK_DIALOG(dialogue));
>      gtk_widget_destroy(dialogue);
>    }
> @@ -1248,9 +1242,6 @@ void disarm_clicked (GtkButton *button, gpointer user_data)
>  GtkWidget *
>  h_guicontrol(LttvPlugin *plugin)
>  {
> -  LttvPluginTab *ptab = LTTV_PLUGIN_TAB(plugin);
> -  ControlData* f = gui_control(ptab);
> -
>    return NULL;
>  }
>  
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com




More information about the lttng-dev mailing list