From e1de4b54dd75cfe38d496cede2bb77c10cc77faf Mon Sep 17 00:00:00 2001 From: pmf Date: Thu, 4 Oct 2007 23:56:05 +0000 Subject: [PATCH] state.c: fix more warnings git-svn-id: http://ltt.polymtl.ca/svn@2604 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/state.c | 33 ++++++----------------------- 1 file changed, 6 insertions(+), 27 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/state.c b/ltt/branches/poly/lttv/lttv/state.c index 9fa85a0d..935b3bba 100644 --- a/ltt/branches/poly/lttv/lttv/state.c +++ b/ltt/branches/poly/lttv/lttv/state.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -1616,14 +1617,8 @@ create_name_tables(LttvTraceState *tcs) { int i, nb; - GQuark f_name, e_name; - LttvTraceHook h; - LttvTraceHookByFacility *thf; - - LttEventType *et; - LttType *t; GString *fe_name = g_string_new(""); @@ -1636,18 +1631,7 @@ create_name_tables(LttvTraceState *tcs) LTTV_POINTER, &v); g_assert(*(v.v_pointer) == NULL); *(v.v_pointer) = name_tables; -#if 0 // Use iteration over the facilities_by_name and then list all event - // types of each facility - nb = ltt_trace_eventtype_number(tcs->parent.t); - name_tables->eventtype_names = g_new(GQuark, nb); - for(i = 0 ; i < nb ; i++) { - et = ltt_trace_eventtype_get(tcs->parent.t, i); - e_name = ltt_eventtype_name(et); - f_name = ltt_facility_name(ltt_eventtype_facility(et)); - g_string_printf(fe_name, "%s.%s", f_name, e_name); - name_tables->eventtype_names[i] = g_quark_from_string(fe_name->str); - } -#endif //0 + if(!lttv_trace_find_hook(tcs->parent.t, LTT_EVENT_SYSCALL_ENTRY, LTT_FIELD_SYSCALL_ID, 0, 0, @@ -1683,7 +1667,7 @@ create_name_tables(LttvTraceState *tcs) name_tables->nb_syscalls = 0; } - if(!lttv_trace_find_hook(tcs->parent.t, LTT_FACILITY_KERNEL_ARCH, + if(!lttv_trace_find_hook(tcs->parent.t, LTT_EVENT_TRAP_ENTRY, LTT_FIELD_TRAP_ID, 0, 0, NULL, NULL, &h)) { @@ -1714,7 +1698,7 @@ create_name_tables(LttvTraceState *tcs) } if(!lttv_trace_find_hook(tcs->parent.t, - LTT_FACILITY_KERNEL, LTT_EVENT_IRQ_ENTRY, + LTT_EVENT_IRQ_ENTRY, LTT_FIELD_IRQ_ID, 0, 0, NULL, NULL, &h)) { @@ -1919,9 +1903,6 @@ static void push_state(LttvTracefileState *tfs, LttvExecutionMode t, int lttv_state_pop_state_cleanup(LttvProcessState *process, LttvTracefileState *tfs) { - guint cpu = tfs->cpu; - LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context; - guint depth = process->execution_stack->len; if(depth == 1){ @@ -1993,10 +1974,10 @@ static gint search_usertrace(gconstpointer a, gconstpointer b) /* Get smaller keys */ if(res->best) { if(ltt_time_compare(*elem_time, *res->best) < 0) { - res->best = elem_time; + res->best = (LttTime *)elem_time; } } else { - res->best = elem_time; + res->best = (LttTime *)elem_time; } return -1; } @@ -2033,8 +2014,6 @@ lttv_state_create_process(LttvTraceState *tcs, LttvProcessState *parent, LttvExecutionState *es; - LttvTraceContext *tc = (LttvTraceContext*)tcs; - char buffer[128]; process->pid = pid; -- 2.34.1