Remove warning generated by newer gcc (4.6)
authorYannick Brosseau <yannick.brosseau@gmail.com>
Thu, 15 Mar 2012 18:49:09 +0000 (14:49 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Fri, 16 Mar 2012 17:50:53 +0000 (13:50 -0400)
Mostly set but unused variable.
One discard const qualifier

Most of the time, the offending code was removed. In some
places, it was commented out with a TODO because a full
remove will necessitate too much code rework for now.

Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
20 files changed:
lttv/lttv/state.c
lttv/lttv/stats.c
lttv/lttv/sync/event_analysis_linreg.c
lttv/lttv/sync/event_processing_lttng_standard.c
lttv/lttv/sync/sync_chain_lttv.c
lttv/modules/gui/controlflow/drawing.c
lttv/modules/gui/controlflow/eventhooks.c
lttv/modules/gui/detailedevents/events.c
lttv/modules/gui/histogram/histocfv.c
lttv/modules/gui/histogram/histodrawing.c
lttv/modules/gui/histogram/histoeventhooks.c
lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c
lttv/modules/gui/resourceview/drawing.c
lttv/modules/gui/resourceview/eventhooks.c
lttv/modules/gui/resourceview/processlist.c
lttv/modules/gui/statistics/statistics.c
lttv/modules/gui/tracecontrol/tracecontrol.c
lttv/modules/text/precomputeState.c
lttv/modules/text/sync_chain_batch.c

index fffd95f08bb81d7783e45cc75014ff257c108c8c..38d3ba4a5f8d8cfd6264428b1f72336e3dea0a59 100644 (file)
@@ -20,7 +20,7 @@
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
-
 #include <glib.h>
 #include <lttv/lttv.h>
 #include <lttv/module.h>
@@ -1839,8 +1839,6 @@ static void state_saved_free(LttvTraceState *self, LttvAttribute *container)
 {
        guint i, nb_tracefile, nb_cpus, nb_irqs, nb_soft_irqs;
 
-       LttvTracefileState *tfcs;
-
        LttvAttribute *tracefiles_tree, *tracefile_tree;
 
        guint *running_process;
@@ -1900,9 +1898,7 @@ static void state_saved_free(LttvTraceState *self, LttvAttribute *container)
        nb_tracefile = self->parent.tracefiles->len;
 
        for(i = 0 ; i < nb_tracefile ; i++) {
-               tfcs =
-                               LTTV_TRACEFILE_STATE(g_array_index(self->parent.tracefiles,
-                                               LttvTracefileContext*, i));
+       
                type = lttv_attribute_get(tracefiles_tree, i, &name, &value, &is_named);
                g_assert(type == LTTV_GOBJECT);
                tracefile_tree = *((LttvAttribute **)(value.v_gobject));
@@ -2695,14 +2691,11 @@ static gboolean soft_irq_raise(void *hook_data, void *call_data)
        //guint8 ev_id = ltt_event_eventtype_id(e);
        LttvTraceHook *th = (LttvTraceHook *)hook_data;
        struct marker_field *f = lttv_trace_get_hook_field(th, 0);
-       LttvNameTables *nt = ((LttvTraceState *)(s->parent.t_context))->name_tables;
-       LttvExecutionSubmode submode;
+
        guint64 softirq = ltt_event_get_long_unsigned(e, f);
 
        expand_soft_irq_table(ts, softirq);
 
-       submode = nt->soft_irq_names[softirq];
-
        /* update softirq status */
        /* a soft irq raises are not cumulative */
        ts->soft_irq_states[softirq].pending=1;
@@ -2896,11 +2889,9 @@ static gboolean dump_syscall(void *hook_data, void *call_data)
        LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
        LttvTraceHook *th = (LttvTraceHook *)hook_data;
        guint id;
-       guint64 address;
        char *symbol;
 
        id = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 0));
-       address = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
        symbol = ltt_event_get_string(e, lttv_trace_get_hook_field(th, 2));
 
        expand_syscall_table(ts, id);
@@ -2934,11 +2925,9 @@ static gboolean dump_softirq(void *hook_data, void *call_data)
        LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
        LttvTraceHook *th = (LttvTraceHook *)hook_data;
        guint id;
-       guint64 address;
        char *symbol;
 
        id = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 0));
-       address = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 1));
        symbol = ltt_event_get_string(e, lttv_trace_get_hook_field(th, 2));
 
        expand_soft_irq_table(ts, id);
@@ -3073,7 +3062,6 @@ static gboolean process_fork(void *hook_data, void *call_data)
        LttvTracefileState *s = (LttvTracefileState *)call_data;
        LttEvent *e = ltt_tracefile_get_event(s->parent.tf);
        LttvTraceHook *th = (LttvTraceHook *)hook_data;
-       guint parent_pid;
        guint child_pid;   /* In the Linux Kernel, there is one PID per thread. */
        guint child_tgid;  /* tgid in the Linux kernel is the "real" POSIX PID. */
        //LttvProcessState *zombie_process;
@@ -3083,8 +3071,7 @@ static gboolean process_fork(void *hook_data, void *call_data)
        LttvProcessState *child_process;
        struct marker_field *f;
 
-       /* Parent PID */
-       parent_pid = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 0));
+       /* Skip Parent PID param */
 
        /* Child PID */
        child_pid = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 1));
@@ -3440,7 +3427,7 @@ static gboolean enum_process_state(void *hook_data, void *call_data)
        LttvProcessState *process = ts->running_process[cpu];
        LttvProcessState *parent_process;
        struct marker_field *f;
-       GQuark type, mode, submode, status;
+       GQuark type;
        LttvExecutionState *es;
        guint i, nb_cpus;
 
@@ -3460,17 +3447,11 @@ static gboolean enum_process_state(void *hook_data, void *call_data)
 
        //FIXME: type is rarely used, enum must match possible types.
 
-       /* mode */
-       f = lttv_trace_get_hook_field(th, 4);
-       mode = ltt_enum_string_get(f,ltt_event_get_unsigned(e, f));
+       /* Skip mode 4th param */
 
-       /* submode */
-       f = lttv_trace_get_hook_field(th, 5);
-       submode = ltt_enum_string_get(f, ltt_event_get_unsigned(e, f));
+       /* Skip submode 5th param */
 
-       /* status */
-       f = lttv_trace_get_hook_field(th, 6);
-       status = ltt_enum_string_get(f, ltt_event_get_unsigned(e, f));
+       /* Skip status 6th param */
 
        /* TGID */
        f = lttv_trace_get_hook_field(th, 7);
index 88a98475fafb283700d5406f89deba14ffc42819..6bc7861dc5bfa97a0f4abee2cfb282560ea91548 100644 (file)
@@ -657,18 +657,6 @@ static gboolean before_schedchange(void *hook_data, void *call_data)
 {
        LttvTracefileStats *tfcs = (LttvTracefileStats *)call_data;
 
-       LttEvent *e = ltt_tracefile_get_event(tfcs->parent.parent.tf);
-
-       LttvTraceHook *th = (LttvTraceHook *)hook_data;
-
-       guint pid_in, pid_out;
-
-       gint64 state_out;
-
-       pid_out = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 0));
-       pid_in = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 1));
-       state_out = ltt_event_get_long_int(e, lttv_trace_get_hook_field(th, 2));
-
        /* compute the time for the process to schedule out */
        mode_change(tfcs);
 
@@ -681,20 +669,8 @@ static gboolean after_schedchange(void *hook_data, void *call_data)
 
        LttvTraceState *ts = (LttvTraceState*)tfcs->parent.parent.t_context;
 
-       LttEvent *e = ltt_tracefile_get_event(tfcs->parent.parent.tf);
-
-       LttvTraceHook *th = (LttvTraceHook *)hook_data;
-
-       guint pid_in, pid_out;
-
-       gint64 state_out;
-
        LttvProcessState *process;
 
-       pid_out = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 0));
-       pid_in = ltt_event_get_unsigned(e, lttv_trace_get_hook_field(th, 1));
-       state_out = ltt_event_get_long_int(e, lttv_trace_get_hook_field(th, 2));
-
        /* get the information for the process scheduled in */
        guint cpu = tfcs->parent.cpu;
        process = ts->running_process[cpu];
@@ -855,8 +831,6 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
 {
        LttvAttribute *sum_container = self->stats;
 
-       LttvAttributeType type;
-
        LttvAttributeValue value;
 
        LttvAttributeName name;
@@ -897,14 +871,14 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
        nb_process = lttv_attribute_get_number(processes_tree);
 
        for(i = 0 ; i < nb_process ; i++) {
-               type = lttv_attribute_get(processes_tree, i, &name, &value, &is_named);
+               lttv_attribute_get(processes_tree, i, &name, &value, &is_named);
                process_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
 
                cpus_tree = lttv_attribute_find_subdir(process_tree, LTTV_STATS_CPU);
                nb_cpu = lttv_attribute_get_number(cpus_tree);
 
                for(j = 0 ; j < nb_cpu ; j++) {
-                       type = lttv_attribute_get(cpus_tree, j, &name, &value, &is_named);
+                       lttv_attribute_get(cpus_tree, j, &name, &value, &is_named);
                        cpu_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
 
                        trace_cpu_tree = lttv_attribute_find_subdir(main_tree,
@@ -915,14 +889,14 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
                        nb_functions = lttv_attribute_get_number(cpu_functions_tree);
 
                        for(nf=0; nf < nb_functions; nf++) {
-                               type = lttv_attribute_get(cpu_functions_tree, nf, &name, &value,
+                               lttv_attribute_get(cpu_functions_tree, nf, &name, &value,
                                                &is_named);
                                function_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
                                function_mode_types_tree = lttv_attribute_find_subdir(function_tree,
                                                LTTV_STATS_MODE_TYPES);
                                nb_mode_type = lttv_attribute_get_number(function_mode_types_tree);
                                for(k = 0 ; k < nb_mode_type ; k++) {
-                                       type = lttv_attribute_get(function_mode_types_tree, k, &name,
+                                       lttv_attribute_get(function_mode_types_tree, k, &name,
                                                        &value, &is_named);
                                        mode_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
 
@@ -936,7 +910,7 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
                                        nb_submode = lttv_attribute_get_number(submodes_tree);
 
                                        for(l = 0 ; l < nb_submode ; l++) {
-                                               type = lttv_attribute_get(submodes_tree, l, &name, &value,
+                                               lttv_attribute_get(submodes_tree, l, &name, &value,
                                                                &is_named);
                                                submode_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
 
@@ -946,7 +920,7 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
 
                                                sum = 0;
                                                for(m = 0 ; m < nb_event_type ; m++) {
-                                                       type = lttv_attribute_get(event_types_tree, m, &name,
+                                                       lttv_attribute_get(event_types_tree, m, &name,
                                                                        &value, &is_named);
                                                        sum += *(value.v_uint);
                                                }
@@ -954,7 +928,7 @@ void lttv_stats_sum_trace(LttvTraceStats *self, LttvAttribute *ts_stats,
                                                                LTTV_UINT, &value);
                                                *(value.v_uint) = sum;
 
-                                               type = lttv_attribute_get(submodes_tree, l, &name, &value,
+                                               lttv_attribute_get(submodes_tree, l, &name, &value,
                                                                &is_named);
                                                submode_tree = LTTV_ATTRIBUTE(*(value.v_gobject));
                                                if(!trace_is_summed) {
index 165f84e20873eb53004bcc73fb51e296ef9bafdc..fbfc052260b33bebd04fb52edeae83712f1b7337 100644 (file)
@@ -152,7 +152,7 @@ static void destroyAnalysisLinReg(SyncState* const syncState)
 static void analyzeExchangeLinReg(SyncState* const syncState, Exchange* const exchange)
 {
        unsigned int ni, nj;
-       double dji, eji;
+       double dji;
        double timoy;
        Fit* fit;
        Message* ackedMessage;
@@ -170,9 +170,6 @@ static void analyzeExchangeLinReg(SyncState* const syncState, Exchange* const ex
        dji= ((double) ackedMessage->inE->cpuTime - (double) ackedMessage->outE->cpuTime
                + (double) exchange->message->outE->cpuTime - (double)
                exchange->message->inE->cpuTime) / 2;
-       eji= fabs((double) ackedMessage->inE->cpuTime - (double)
-               ackedMessage->outE->cpuTime - (double) exchange->message->outE->cpuTime +
-               (double) exchange->message->inE->cpuTime) / 2;
        timoy= ((double) ackedMessage->outE->cpuTime + (double)
                exchange->message->inE->cpuTime) / 2;
        ni= ackedMessage->outE->traceNum;
index 8cd4f83978ad65e3563361152dcd90ca2ba17c17..ec2a6a924e5a6d267fef6c8adc4c3e3d26449509 100644 (file)
@@ -169,10 +169,6 @@ static void initProcessingLTTVStandard(SyncState* const syncState, ...)
  */
 static AllFactors* finalizeProcessingLTTVStandard(SyncState* const syncState)
 {
-       ProcessingDataLTTVStandard* processingData;
-
-       processingData= (ProcessingDataLTTVStandard*) syncState->processingData;
-
        partialDestroyProcessingLTTVStandard(syncState);
 
        return syncState->matchingModule->finalizeMatching(syncState);
index bb49bbd20b86c4a3484b660181d2731a382aa13e..ecedd6fe5b20e277d01d268987847b7e07c4f591 100644 (file)
@@ -217,7 +217,6 @@ bool syncTraceset(LttvTracesetContext* const traceSetContext)
        GArray* factors;
        double minOffset, minDrift;
        unsigned int refFreqTrace;
-       int retval;
 
        if (!optionSync.present)
        {
@@ -430,7 +429,7 @@ bool syncTraceset(LttvTracesetContext* const traceSetContext)
        if (optionSyncStats.present)
        {
                gettimeofday(&endTime, 0);
-               retval= getrusage(RUSAGE_SELF, &endUsage);
+               getrusage(RUSAGE_SELF, &endUsage);
 
                timeDiff(&endTime, &startTime);
                timeDiff(&endUsage.ru_utime, &startUsage.ru_utime);
index a901e8bb4531a9bf7bfc9e14da51563ae88ec0fa..751389bc85053b6f6ed0abf1a94f286f261bebc7 100644 (file)
@@ -1267,20 +1267,7 @@ void drawing_remove_square(Drawing_t *drawing,
 
 void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->ruler->allocation.width;
-  req.height = drawing->ruler->allocation.height;
-
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* Redraw the ruler */
index 5066b524f7d877cf64b3c9aaee3e20e79d874800..eb86a20f171e35958c75a2d70fde376cc566ea9d 100644 (file)
@@ -516,11 +516,9 @@ int before_schedchange_hook(void *hook_data, void *call_data)
 
   guint pid_out;
   guint pid_in;
-  guint state_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));
-    state_out = ltt_event_get_long_unsigned(e, lttv_trace_get_hook_field(th, 2));
   }
   
   tfc->target_pid = pid_out;
@@ -920,8 +918,6 @@ int after_schedchange_hook(void *hook_data, void *call_data)
   
   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));
   }
 
index 70696dc6c344e09233248bb39fd39c4e969abcd4..1ec3e5b2f7add71f621e521400918c593449a000 100644 (file)
@@ -1411,15 +1411,14 @@ static void get_events(double new_value, EventViewerData *event_viewer_data)
   /* Get the beginning position of the read (with seek backward or seek forward)
    */
     if(relative_position > 0) {
-      guint count;
-      count = lttv_process_traceset_seek_n_forward(tsc, relative_position,
+
+      lttv_process_traceset_seek_n_forward(tsc, relative_position,
           events_check_handler,
           &event_viewer_data->tab->stop_foreground,
           event_viewer_data->main_win_filter,
           event_viewer_data->filter, NULL, event_viewer_data);
     } else if(relative_position < 0) {
-      guint count;
-      
+
       /* Get an idea of currently shown event dispersion */
       LttTime first_event_time =
         lttv_traceset_context_position_get_time(event_viewer_data->first_event);
@@ -1429,7 +1428,7 @@ static void get_events(double new_value, EventViewerData *event_viewer_data)
       if(ltt_time_compare(time_diff, ltt_time_zero) == 0)
         time_diff = seek_back_default_offset;
 
-      count = lttv_process_traceset_seek_n_backward(tsc,
+      lttv_process_traceset_seek_n_backward(tsc,
           abs(relative_position),
           time_diff,
           (seek_time_fct)lttv_state_traceset_seek_time_closest,
index 1a5b8ebf1e3b744225eec77965ff1b29c95d63af..657a92cbcee371e131340bcfeb30ee207b9eaf65 100644 (file)
@@ -52,7 +52,6 @@ HistoControlFlowData *
 guihistocontrolflow(LttvPluginTab *ptab)
 {
   GtkWidget *button_widget, *drawing_widget, *drawing_area;
-  GtkWidget *buttonP,*buttonM;
   histoDrawing_t *drawing;
   HistoControlFlowData* histo_control_flow_data = g_new(HistoControlFlowData,1) ;
   
@@ -84,8 +83,6 @@ guihistocontrolflow(LttvPluginTab *ptab)
   histo_control_flow_data->buttonwidget = histo_buttonwidget_construct(histo_control_flow_data);
   
   button_widget = histo_buttonwidget_get_widget( histo_control_flow_data-> buttonwidget);
-  buttonP =histo_control_flow_data-> buttonwidget->buttonP;
-  buttonM =histo_control_flow_data-> buttonwidget->buttonM;
 
   //set the size of ruler fix
   gtk_widget_set_size_request(histo_control_flow_data->drawing->ruler, -1, 25);
index 72292be180fc97ad8b6f832af8e4d1a34af8a97c..88287e1ccf5d685a5bfffeda93e51421004462cc 100644 (file)
@@ -921,20 +921,7 @@ void drawing_remove_square(histoDrawing_t *drawing,
 
 void histo_drawing_update_ruler(histoDrawing_t *drawing, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->ruler->allocation.width;
-  req.height = drawing->ruler->allocation.height;
-
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* Redraw the ruler */
@@ -1052,19 +1039,7 @@ histo_expose_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer user_data
 
  void histo_drawing_update_vertical_ruler(histoDrawing_t *drawing)//, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->vertical_ruler->allocation.width;
-  req.height = drawing->vertical_ruler->allocation.height;
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->vertical_ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* notify mouse on ruler */
index 4e075c7d001e9eb0843c2b337cb748a4faeb803e..d0d0557e0cc3b7d51fcd88491782c3c0c2f1de21 100644 (file)
@@ -146,8 +146,6 @@ void histo_request_event( HistoControlFlowData *histocontrol_flow_data, guint x,
   TimeWindow time_window = lttvwindow_get_time_window( tab );
   LttTime time_start, time_end;
 
-  LttvTraceState *ts;
-  
   //find the tracehooks 
   LttvTracesetContext *tsc = lttvwindow_get_traceset_context(tab);
   
@@ -200,7 +198,6 @@ void histo_request_event( HistoControlFlowData *histocontrol_flow_data, guint x,
                      histo_after_chunk,
                      histo_events_request,
                      LTTV_PRIO_DEFAULT);
-       ts = (LttvTraceState *)tsc->traces[i];
       // Fill the events request
        histo_events_request->owner                 = histocontrol_flow_data; 
        histo_events_request->viewer_data           = histocontrol_flow_data; 
@@ -324,7 +321,7 @@ int histo_after_trace(void *hook_data, void *call_data){
   
    return 0;
 }
-
+/* TODO ybrosseau 2012-03-15: Cleanup line_src */
 void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begin,
                    guint draw_end)
 {
@@ -346,7 +343,7 @@ void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begi
      
   guint val, h_val;
   
-  guint i, line_src;
+  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++){
@@ -359,7 +356,7 @@ void histogram_show(HistoControlFlowData *histocontrol_flow_data,guint draw_begi
        histo_convert_pixels_to_time(width, i+1,
                time_window,
                &t2);
-       line_src=i;
+       /* line_src=i; */
        
 //check if zoom in is used and more than 1 pixel correspond to each 1nsec
 //used for drawing point (not line) on the screen.
index 7243082e325ea8a209f061d5700301b2274ef643..c06130b642bd6bca0d0a2d9d04802199043ade28 100644 (file)
@@ -628,7 +628,8 @@ void delete_viewer(GtkWidget * widget, gpointer user_data)
   g_object_set_data(G_OBJECT(tab->viewer_container), "focused_viewer", NULL);
 }
 
-
+#if UNFINISHED_FEATURE
+/* TODO ybrosseau 2012-03-15: Function is half implemented. Should be removed */
 /* open_traceset will open a traceset saved in a file
  * Right now, it is not finished yet, (not working)
  * FIXME
@@ -665,7 +666,7 @@ void open_traceset(GtkWidget * widget, gpointer user_data)
   }
 
 }
-
+#endif
 /* lttvwindow_process_pending_requests
  *
  * Process requests for parts of the trace from viewers.
@@ -908,7 +909,9 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
         tfc = lttv_traceset_context_get_current_tfc(tsc);
         g_assert(g_slist_length(list_in)>0);
         EventsRequest *events_request = g_slist_nth_data(list_in, 0);
+#ifdef DEBUG
         guint seek_count;
+#endif
 
         /* 1.2.1 If first request in list_in is a time request */
         if(events_request->start_position == NULL) {
@@ -923,7 +926,9 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
                                                   events_request->start_time);
 
             /* Process the traceset with only state hooks */
+#ifdef DEBUG
             seek_count =
+#endif //DEBUG
                lttv_process_traceset_middle(tsc,
                                             events_request->start_time,
                                             G_MAXUINT, NULL);
@@ -967,7 +972,9 @@ gboolean lttvwindow_process_pending_requests(Tab *tab)
                                                   pos_time);
 
             /* Process the traceset with only state hooks */
+#ifdef DEBUG
             seek_count =
+#endif
                lttv_process_traceset_middle(tsc,
                                             ltt_time_infinite,
                                             G_MAXUINT,
@@ -2232,7 +2239,9 @@ void
 on_open_activate                       (GtkMenuItem     *menuitem,
                                         gpointer         user_data)
 {
+#ifdef UNFINISHED_FEATURE
   open_traceset((GtkWidget*)menuitem, user_data);
+#endif
 }
 
 
@@ -3022,7 +3031,9 @@ void
 on_button_open_clicked                 (GtkButton       *button,
                                         gpointer         user_data)
 {
+#ifdef UNFINISHED_FEATURE
   open_traceset((GtkWidget*)button, user_data);
+#endif
 }
 
 
@@ -3710,8 +3721,7 @@ MainWindow *construct_main_window(MainWindow * parent)
   LttvIAttribute *attributes =
          LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL));
   LttvAttributeValue value;
-  Tab *new_tab;
-         
+
   new_m_window = g_new(MainWindow, 1);
 
   // Add the object's information to the module's array 
@@ -3772,7 +3782,6 @@ MainWindow *construct_main_window(MainWindow * parent)
            "Tab_Plugin",
            ptab,
           (GDestroyNotify)tab_destructor);
-    new_tab = ptab->tab;
   } else {
     LttvPluginTab *ptab = g_object_new(LTTV_TYPE_PLUGIN_TAB, NULL);
     init_tab(ptab->tab, new_m_window, NULL, notebook, "Traceset");
@@ -3782,7 +3791,6 @@ MainWindow *construct_main_window(MainWindow * parent)
            "Tab_Plugin",
            ptab,
           (GDestroyNotify)tab_destructor);
-    new_tab = ptab->tab;
   }
 
   /* Insert default viewers */
index 787c5a70e12b32ee28c55f53a68f21ceb900e125..05ab4b436e758444496cb3b49a2401fb5b4203f7 100644 (file)
@@ -893,16 +893,15 @@ void lttvwindowtraces_set_in_progress(LttvAttributeName module_name,
                                       LttvTrace *trace)
 {
   LttvAttribute *attribute = lttv_trace_attribute(trace);
-  LttvAttributeValue value;
 
   attribute = 
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(attribute),
                                 module_name));
   g_assert(attribute);
  
-  value = lttv_iattribute_add(LTTV_IATTRIBUTE(attribute),
-                              LTTV_IN_PROGRESS,
-                              LTTV_INT);
+  lttv_iattribute_add(LTTV_IATTRIBUTE(attribute),
+                     LTTV_IN_PROGRESS,
+                     LTTV_INT);
   /* the value is left unset. The only presence of the attribute is necessary.
    */
 }
@@ -947,16 +946,15 @@ void lttvwindowtraces_set_ready(LttvAttributeName module_name,
                                 LttvTrace *trace)
 {
   LttvAttribute *attribute = lttv_trace_attribute(trace);
-  LttvAttributeValue value;
 
   attribute = 
       LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(attribute),
                                 module_name));
   g_assert(attribute);
  
-  value = lttv_iattribute_add(LTTV_IATTRIBUTE(attribute),
-                              LTTV_READY,
-                              LTTV_INT);
+  lttv_iattribute_add(LTTV_IATTRIBUTE(attribute),
+                     LTTV_READY,
+                     LTTV_INT);
   /* the value is left unset. The only presence of the attribute is necessary.
    */
 }
index 7e324d76c7fdaabb55ec2c2d546b354833f71013..69007e1fc13a3a43c70d3558c377c14caab826c3 100644 (file)
@@ -1326,20 +1326,7 @@ void drawing_remove_square(Drawing_t *drawing,
 
 void drawing_update_ruler(Drawing_t *drawing, TimeWindow *time_window)
 {
-  GtkRequisition req;
-  GdkRectangle rect;
-  
-  req.width = drawing->ruler->allocation.width;
-  req.height = drawing->ruler->allocation.height;
-
-  rect.x = 0;
-  rect.y = 0;
-  rect.width = req.width;
-  rect.height = req.height;
-
   gtk_widget_queue_draw(drawing->ruler);
-  //gtk_widget_draw( drawing->ruler, &rect);
 }
 
 /* Redraw the ruler */
index 1edf0494c374961f42ec401f6ad2bb682d25528f..6b14c07d5995cd00df3a311fda035d4248078139 100644 (file)
@@ -389,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 */
@@ -551,19 +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;
   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;
@@ -574,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);
index 00d200c4b68044bd2319ef409c66d13c77c36211..fee0354a7c5f86c05fbb71be6c55f2f39ca4586f 100644 (file)
@@ -766,11 +766,10 @@ HashedResourceData *resourcelist_obtain_generic(ControlFlowData *resourceview_da
 
     /* Determine if we should add it hidden or not */
     {
-      gboolean result;
       GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(resourceview_data->process_list->process_list_widget));
       GtkTreeIter parent_iter;
 
-      result = gtk_tree_model_iter_parent(model, &parent_iter, &data->y_iter);
+      gtk_tree_model_iter_parent(model, &parent_iter, &data->y_iter);
       GtkTreePath *path = gtk_tree_model_get_path(model, &parent_iter);
       data->hidden = gtk_tree_view_row_expanded(GTK_TREE_VIEW(resourceview_data->process_list->process_list_widget), path)?0:1;
       gtk_tree_path_free(path);
index ce7186299af8d49959282ed74addb7ea00171b0c..b2120d06a5444d66d4fd1135f2e2e07f8c2a8ed3 100644 (file)
@@ -466,7 +466,9 @@ void show_traceset_stats(StatisticViewerData * statistic_viewer_data)
          value = lttv_attribute_add(tscs->stats,
                                     g_quark_from_static_string("WARNING: Live traceset"),
                                     LTTV_STRING);
-         *(value.v_string) = live_msg;
+         /* TODO ybrosseau 2012-03-15: add cast to silent discard const 
+                                       warning... find a better way */
+         *(value.v_string) = (char *)live_msg;
          
   }
   g_hash_table_insert(statistic_viewer_data->statistic_hash,
index 2aae7aaca7bdb1deee1ffc06a79aa1a3b9dee744..d4919a97a6b06bb7be27e7ff058690a0c323133a 100644 (file)
@@ -476,9 +476,6 @@ static int execute_command(const gchar *command, const gchar *username,
     int status;
     ssize_t count;
     /* discuss with su */
-    struct timeval timeout;
-    timeout.tv_sec = 1;
-    timeout.tv_usec = 0;
 
     struct pollfd pollfd;
     int num_rdy;
index 3314d16ad2f446fb379301923b34a6c564071564..572e0b5dfca19049ef15b7f90311465585a50cd3 100644 (file)
@@ -163,8 +163,6 @@ static int for_each_event(void *hook_data, void *call_data)
 
   LttvTracefileState *tfs = (LttvTracefileState *)call_data;
 
-  LttEvent *e;
-
   /* Only save at LTTV_STATE_SAVE_INTERVAL */
   if(likely((*event_count)++ < LTTV_STATE_SAVE_INTERVAL))
     return FALSE;
@@ -173,8 +171,6 @@ static int for_each_event(void *hook_data, void *call_data)
 
   LttvTraceState *ts = (LttvTraceState*)tfc->t_context;
 
-  e = ltt_tracefile_get_event(tfc->tf);
-
   if(a_raw) {
     lttv_state_write_raw(ts, tfs->parent.timestamp, a_file);
   } else {
index 33b017681c1aad1fd2e8808d36e2a0feae47aae6..97e77af8d0a80fdd997e64a5f04a0a724af118b4 100644 (file)
@@ -341,7 +341,6 @@ void teardownSyncChain(LttvTracesetContext* const traceSetContext)
        SyncState* syncState;
        struct timeval endTime;
        struct rusage endUsage;
-       int retval;
 
        tracesetChainState= g_hash_table_lookup(tracesetChainStates, traceSetContext);
        syncState= tracesetChainState->syncState;
@@ -379,7 +378,7 @@ void teardownSyncChain(LttvTracesetContext* const traceSetContext)
        free(syncState);
 
        gettimeofday(&endTime, 0);
-       retval= getrusage(RUSAGE_SELF, &endUsage);
+       getrusage(RUSAGE_SELF, &endUsage);
 
        timeDiff(&endTime, &tracesetChainState->startTime);
        timeDiff(&endUsage.ru_utime, &tracesetChainState->startUsage.ru_utime);
This page took 0.039139 seconds and 4 git commands to generate.