Remove warning generated by newer gcc (4.6)
[lttv.git] / lttv / modules / gui / resourceview / eventhooks.c
index 9edba155fe69845c88c32a359f39c9a18fab41b5..6b14c07d5995cd00df3a311fda035d4248078139 100644 (file)
@@ -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
@@ -394,9 +389,7 @@ int before_schedchange_hook(void *hook_data, void *call_data)
    */
 
   guint pid_out;
-  guint pid_in;
   pid_out = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
-  pid_in = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
 // TODO: can't we reenable this? pmf
 //  if(pid_in != 0 && pid_out != 0) {
 //    /* not a transition to/from idle */
@@ -408,10 +401,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);
   
@@ -558,20 +549,10 @@ 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;
   
-  guint pid_in;
-  {
-    guint pid_out;
-    pid_out = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 0));
-    pid_in = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
-  }
-
-
   /* Find process pid_in in the list... */
   //process_in = lttv_state_find_process(ts, ANY_CPU, pid_in);
   //process_in = tfs->process;
@@ -582,7 +563,6 @@ int after_schedchange_hook(void *hook_data, void *call_data)
 #ifdef EXTRA_CHECK
   g_assert(process_in != NULL);
 #endif //EXTRA_CHECK
-  birth = process_in->creation_time;
 
   //hashed_process_data_in = processlist_get_process_data(process_list, cpuq, trace_num);
   hashed_process_data_in = resourcelist_obtain_cpu(resourceview_data, trace_num, cpu);
@@ -676,12 +656,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 +801,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,17 +836,16 @@ 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:
   GQuark name;
   {
     gchar *str;
-    str = g_strdup_printf("IRQ %" PRIu64 " [%s]", irq, (char*)g_quark_to_string(ts->irq_names[irq]));
+    str = g_strdup_printf("IRQ %" PRIu64 " [%s]", irq,
+                    (char*)g_quark_to_string(ts->name_tables->irq_names[irq]));
     name = g_quark_from_string(str);
     g_free(str);
   }
@@ -1008,8 +982,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.
@@ -1047,10 +1019,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);
 
@@ -1185,8 +1155,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.
@@ -1227,10 +1195,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);
 
@@ -1357,7 +1323,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;
@@ -1371,10 +1336,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;
@@ -1386,10 +1349,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)) {
@@ -1566,9 +1527,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)
@@ -1805,7 +1764,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);
   
@@ -1927,7 +1885,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)
@@ -2048,7 +2005,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(
@@ -2093,7 +2049,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;
@@ -2210,12 +2165,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);
This page took 0.026391 seconds and 4 git commands to generate.