From: Yannick Brosseau Date: Thu, 15 Mar 2012 18:49:09 +0000 (-0400) Subject: Remove warning generated by newer gcc (4.6) X-Git-Tag: v1.5-beta1~90 X-Git-Url: http://git.lttng.org/?p=lttv.git;a=commitdiff_plain;h=e865422cc50d00cb57ec05ed07bba4cbe160904e Remove warning generated by newer gcc (4.6) 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 --- diff --git a/lttv/lttv/state.c b/lttv/lttv/state.c index fffd95f0..38d3ba4a 100644 --- a/lttv/lttv/state.c +++ b/lttv/lttv/state.c @@ -20,7 +20,7 @@ #ifdef HAVE_CONFIG_H #include #endif - + #include #include #include @@ -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); diff --git a/lttv/lttv/stats.c b/lttv/lttv/stats.c index 88a98475..6bc7861d 100644 --- a/lttv/lttv/stats.c +++ b/lttv/lttv/stats.c @@ -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) { diff --git a/lttv/lttv/sync/event_analysis_linreg.c b/lttv/lttv/sync/event_analysis_linreg.c index 165f84e2..fbfc0522 100644 --- a/lttv/lttv/sync/event_analysis_linreg.c +++ b/lttv/lttv/sync/event_analysis_linreg.c @@ -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; diff --git a/lttv/lttv/sync/event_processing_lttng_standard.c b/lttv/lttv/sync/event_processing_lttng_standard.c index 8cd4f839..ec2a6a92 100644 --- a/lttv/lttv/sync/event_processing_lttng_standard.c +++ b/lttv/lttv/sync/event_processing_lttng_standard.c @@ -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); diff --git a/lttv/lttv/sync/sync_chain_lttv.c b/lttv/lttv/sync/sync_chain_lttv.c index bb49bbd2..ecedd6fe 100644 --- a/lttv/lttv/sync/sync_chain_lttv.c +++ b/lttv/lttv/sync/sync_chain_lttv.c @@ -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); diff --git a/lttv/modules/gui/controlflow/drawing.c b/lttv/modules/gui/controlflow/drawing.c index a901e8bb..751389bc 100644 --- a/lttv/modules/gui/controlflow/drawing.c +++ b/lttv/modules/gui/controlflow/drawing.c @@ -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 */ diff --git a/lttv/modules/gui/controlflow/eventhooks.c b/lttv/modules/gui/controlflow/eventhooks.c index 5066b524..eb86a20f 100644 --- a/lttv/modules/gui/controlflow/eventhooks.c +++ b/lttv/modules/gui/controlflow/eventhooks.c @@ -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)); } diff --git a/lttv/modules/gui/detailedevents/events.c b/lttv/modules/gui/detailedevents/events.c index 70696dc6..1ec3e5b2 100644 --- a/lttv/modules/gui/detailedevents/events.c +++ b/lttv/modules/gui/detailedevents/events.c @@ -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, diff --git a/lttv/modules/gui/histogram/histocfv.c b/lttv/modules/gui/histogram/histocfv.c index 1a5b8ebf..657a92cb 100644 --- a/lttv/modules/gui/histogram/histocfv.c +++ b/lttv/modules/gui/histogram/histocfv.c @@ -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); diff --git a/lttv/modules/gui/histogram/histodrawing.c b/lttv/modules/gui/histogram/histodrawing.c index 72292be1..88287e1c 100644 --- a/lttv/modules/gui/histogram/histodrawing.c +++ b/lttv/modules/gui/histogram/histodrawing.c @@ -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 */ diff --git a/lttv/modules/gui/histogram/histoeventhooks.c b/lttv/modules/gui/histogram/histoeventhooks.c index 4e075c7d..d0d0557e 100644 --- a/lttv/modules/gui/histogram/histoeventhooks.c +++ b/lttv/modules/gui/histogram/histoeventhooks.c @@ -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*/;inumber_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. diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 7243082e..c06130b6 100644 --- a/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -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 */ diff --git a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c index 787c5a70..05ab4b43 100644 --- a/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c +++ b/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c @@ -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. */ } diff --git a/lttv/modules/gui/resourceview/drawing.c b/lttv/modules/gui/resourceview/drawing.c index 7e324d76..69007e1f 100644 --- a/lttv/modules/gui/resourceview/drawing.c +++ b/lttv/modules/gui/resourceview/drawing.c @@ -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 */ diff --git a/lttv/modules/gui/resourceview/eventhooks.c b/lttv/modules/gui/resourceview/eventhooks.c index 1edf0494..6b14c07d 100644 --- a/lttv/modules/gui/resourceview/eventhooks.c +++ b/lttv/modules/gui/resourceview/eventhooks.c @@ -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); diff --git a/lttv/modules/gui/resourceview/processlist.c b/lttv/modules/gui/resourceview/processlist.c index 00d200c4..fee0354a 100644 --- a/lttv/modules/gui/resourceview/processlist.c +++ b/lttv/modules/gui/resourceview/processlist.c @@ -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); diff --git a/lttv/modules/gui/statistics/statistics.c b/lttv/modules/gui/statistics/statistics.c index ce718629..b2120d06 100644 --- a/lttv/modules/gui/statistics/statistics.c +++ b/lttv/modules/gui/statistics/statistics.c @@ -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, diff --git a/lttv/modules/gui/tracecontrol/tracecontrol.c b/lttv/modules/gui/tracecontrol/tracecontrol.c index 2aae7aac..d4919a97 100644 --- a/lttv/modules/gui/tracecontrol/tracecontrol.c +++ b/lttv/modules/gui/tracecontrol/tracecontrol.c @@ -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; diff --git a/lttv/modules/text/precomputeState.c b/lttv/modules/text/precomputeState.c index 3314d16a..572e0b5d 100644 --- a/lttv/modules/text/precomputeState.c +++ b/lttv/modules/text/precomputeState.c @@ -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 { diff --git a/lttv/modules/text/sync_chain_batch.c b/lttv/modules/text/sync_chain_batch.c index 33b01768..97e77af8 100644 --- a/lttv/modules/text/sync_chain_batch.c +++ b/lttv/modules/text/sync_chain_batch.c @@ -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);