From: compudj Date: Mon, 15 Dec 2008 18:11:25 +0000 (+0000) Subject: warning fixes X-Git-Tag: v0.12.20~312 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=43ed82b5b0a7de73d473ec7e6f8802e18d729ec3;p=lttv.git warning fixes git-svn-id: http://ltt.polymtl.ca/svn@3177 04897980-b3bd-0310-b5e0-8ef037075253 --- diff --git a/trunk/lttv/ltt/event.c b/trunk/lttv/ltt/event.c index 46b68af7..4297bf0c 100644 --- a/trunk/lttv/ltt/event.c +++ b/trunk/lttv/ltt/event.c @@ -175,7 +175,7 @@ guint32 ltt_event_get_unsigned(LttEvent *e, struct marker_field *f) break; case 8: default: - g_critical("ltt_event_get_unsigned : field size %i unknown", f->size); + g_critical("ltt_event_get_unsigned : field size %li unknown", f->size); return 0; break; } @@ -205,7 +205,7 @@ gint32 ltt_event_get_int(LttEvent *e, struct marker_field *f) break; case 8: default: - g_critical("ltt_event_get_int : field size %i unknown", f->size); + g_critical("ltt_event_get_int : field size %li unknown", f->size); return 0; break; } @@ -237,7 +237,7 @@ guint64 ltt_event_get_long_unsigned(LttEvent *e, struct marker_field *f) return ltt_get_uint64(reverse_byte_order, e->data + f->offset); break; default: - g_critical("ltt_event_get_long_unsigned : field size %i unknown", f->size); + g_critical("ltt_event_get_long_unsigned : field size %li unknown", f->size); return 0; break; } @@ -269,7 +269,7 @@ gint64 ltt_event_get_long_int(LttEvent *e, struct marker_field *f) return ltt_get_int64(reverse_byte_order, e->data + f->offset); break; default: - g_critical("ltt_event_get_long_int : field size %i unknown", f->size); + g_critical("ltt_event_get_long_int : field size %li unknown", f->size); return 0; break; } diff --git a/trunk/lttv/ltt/event.h b/trunk/lttv/ltt/event.h index 0741e0ed..8293d15f 100644 --- a/trunk/lttv/ltt/event.h +++ b/trunk/lttv/ltt/event.h @@ -47,7 +47,7 @@ struct LttEventPosition { uint64_t tsc; /* Current timestamp counter */ }; -static inline guint16 ltt_event_id(struct LttEvent *event) +static inline guint16 ltt_event_id(const struct LttEvent *event) { return event->event_id; } diff --git a/trunk/lttv/ltt/marker.h b/trunk/lttv/ltt/marker.h index 4d21e471..3a84749d 100644 --- a/trunk/lttv/ltt/marker.h +++ b/trunk/lttv/ltt/marker.h @@ -44,7 +44,6 @@ struct marker_data { enum marker_id { MARKER_ID_SET_MARKER_ID = 0, /* Static IDs available (range 0-7) */ MARKER_ID_SET_MARKER_FORMAT, - MARKER_ID_DYNAMIC, /* Dynamic IDs (range: 8-65535) */ }; static inline guint16 marker_get_id_from_info(struct marker_data *data, diff --git a/trunk/lttv/ltt/tracefile.c b/trunk/lttv/ltt/tracefile.c index 0fb8fbe7..752b8117 100644 --- a/trunk/lttv/ltt/tracefile.c +++ b/trunk/lttv/ltt/tracefile.c @@ -32,9 +32,12 @@ #include #include #include +#include #include #include #include +#include +#include // For realpath #include @@ -48,6 +51,9 @@ #include #include +/* from marker.c */ +extern long marker_update_fields_offsets(struct marker_info *info, const char *data); + /* Tracefile names used in this file */ GQuark LTT_TRACEFILE_NAME_METADATA; @@ -270,7 +276,7 @@ static gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf) if(munmap(tf->buffer.head, PAGE_ALIGN(ltt_subbuffer_header_size()))) { - g_warning("unmap size : %u\n", + g_warning("unmap size : %zu\n", PAGE_ALIGN(ltt_subbuffer_header_size())); perror("munmap error"); g_assert(0); @@ -289,7 +295,7 @@ static gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf) unmap_file: if(munmap(tf->buffer.head, PAGE_ALIGN(ltt_subbuffer_header_size()))) { - g_warning("unmap size : %u\n", + g_warning("unmap size : %zu\n", PAGE_ALIGN(ltt_subbuffer_header_size())); perror("munmap error"); g_assert(0); @@ -363,7 +369,7 @@ static int get_tracefile_name_number(gchar *raw_name, { guint raw_name_len = strlen(raw_name); gchar char_name[PATH_MAX]; - int i; + unsigned int i; int underscore_pos; long int cpu_num; gchar *endptr; @@ -472,7 +478,7 @@ void compute_tracefile_group(GQuark key_id, GArray *group, struct compute_tracefile_group_args *args) { - int i; + unsigned int i; LttTracefile *tf; for(i=0; ilen; i++) { @@ -486,7 +492,7 @@ void compute_tracefile_group(GQuark key_id, static void ltt_tracefile_group_destroy(gpointer data) { GArray *group = (GArray *)data; - int i; + unsigned int i; LttTracefile *tf; if (group->len > 0) @@ -499,10 +505,10 @@ static void ltt_tracefile_group_destroy(gpointer data) g_array_free(group, TRUE); } -static gboolean ltt_tracefile_group_has_cpu_online(gpointer data) +static __attribute__ ((__unused__)) gboolean ltt_tracefile_group_has_cpu_online(gpointer data) { GArray *group = (GArray *)data; - int i; + unsigned int i; LttTracefile *tf; for(i=0; ilen; i++) { @@ -651,7 +657,6 @@ static int open_tracefiles(LttTrace *trace, gchar *root_path, gchar *relative_pa static int ltt_process_metadata_tracefile(LttTracefile *tf) { int err; - guint i; while(1) { err = ltt_tracefile_read_seek(tf); @@ -755,7 +760,8 @@ LttTrace *ltt_trace_open(const gchar *pathname) LttTrace * t; LttTracefile *tf; GArray *group; - int i, ret; + unsigned int i; + int ret; ltt_subbuffer_header_t *header; DIR *dir; struct dirent *entry; @@ -903,7 +909,7 @@ static void group_time_span_get(GQuark name, gpointer data, gpointer user_data) (struct tracefile_time_span_get_args*)user_data; GArray *group = (GArray *)data; - int i; + unsigned int i; LttTracefile *tf; LttTime tmp_start; LttTime tmp_end; @@ -1226,10 +1232,10 @@ static void print_debug_event_header(LttEvent *ev, void *start_pos, void *end_po unsigned int offset = 0; int i, j; - g_printf("Event header (tracefile %s offset %llx):\n", + g_printf("Event header (tracefile %s offset %" PRIx64 "):\n", g_quark_to_string(ev->tracefile->long_name), - ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size) - + (long)start_pos - (long)ev->tracefile->buffer.head); + ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size) + + (long)start_pos - (long)ev->tracefile->buffer.head); while (offset < (long)end_pos - (long)start_pos) { g_printf("%8lx", (long)start_pos - (long)ev->tracefile->buffer.head + offset); @@ -1445,10 +1451,10 @@ static void print_debug_event_data(LttEvent *ev) if (!max(ev->event_size, ev->data_size)) return; - g_printf("Event data (tracefile %s offset %llx):\n", - g_quark_to_string(ev->tracefile->long_name), - ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size) - + (long)ev->data - (long)ev->tracefile->buffer.head); + g_printf("Event data (tracefile %s offset %" PRIx64 "):\n", + g_quark_to_string(ev->tracefile->long_name), + ((uint64_t)ev->tracefile->buffer.index * ev->tracefile->buf_size) + + (long)ev->data - (long)ev->tracefile->buffer.head); while (offset < max(ev->event_size, ev->data_size)) { g_printf("%8lx", (long)ev->data + offset @@ -1489,7 +1495,6 @@ static void print_debug_event_data(LttEvent *ev) void ltt_update_event_size(LttTracefile *tf) { off_t size = 0; - char *tscdata; struct marker_info *info; if (tf->name == LTT_TRACEFILE_NAME_METADATA) { @@ -2536,7 +2541,7 @@ LttTime ltt_trace_start_time_monotonic(LttTrace *t) return t->start_time_from_tsc; } -static LttTracefile *ltt_tracefile_new() +static __attribute__ ((__unused__)) LttTracefile *ltt_tracefile_new() { LttTracefile *tf; tf = g_new(LttTracefile, 1); @@ -2544,12 +2549,12 @@ static LttTracefile *ltt_tracefile_new() return tf; } -static void ltt_tracefile_destroy(LttTracefile *tf) +static __attribute__ ((__unused__)) void ltt_tracefile_destroy(LttTracefile *tf) { g_free(tf); } -static void ltt_tracefile_copy(LttTracefile *dest, const LttTracefile *src) +static __attribute__ ((__unused__)) void ltt_tracefile_copy(LttTracefile *dest, const LttTracefile *src) { *dest = *src; } diff --git a/trunk/lttv/lttv/lttv/attribute.c b/trunk/lttv/lttv/lttv/attribute.c index eab857be..9966b448 100644 --- a/trunk/lttv/lttv/lttv/attribute.c +++ b/trunk/lttv/lttv/lttv/attribute.c @@ -142,11 +142,11 @@ LttvAttributeValue lttv_attribute_add(LttvAttribute *self, LttvAttributeName name, LttvAttributeType t) { - unsigned i; + unsigned int i; Attribute a, *pa; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(i != 0) g_error("duplicate entry in attribute table"); a.name = name; @@ -165,11 +165,11 @@ LttvAttributeValue lttv_attribute_add_unnamed(LttvAttribute *self, LttvAttributeName name, LttvAttributeType t) { - unsigned i; + unsigned int i; Attribute a, *pa; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(i != 0) g_error("duplicate entry in attribute table"); a.name = name; @@ -215,9 +215,9 @@ lttv_attribute_remove(LttvAttribute *self, unsigned i) void lttv_attribute_remove_by_name(LttvAttribute *self, LttvAttributeName name) { - unsigned i; + unsigned int i; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(unlikely(i == 0)) g_error("remove by name non existent attribute"); lttv_attribute_remove(self, i - 1); @@ -231,13 +231,13 @@ lttv_attribute_remove_by_name(LttvAttribute *self, LttvAttributeName name) /*CHECK*/LttvAttribute* lttv_attribute_find_subdir(LttvAttribute *self, LttvAttributeName name) { - unsigned i; + unsigned int i; Attribute a; LttvAttribute *new; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(likely(i != 0)) { a = g_array_index(self->attributes, Attribute, i - 1); if(likely(a.type == LTTV_GOBJECT && LTTV_IS_IATTRIBUTE(a.value.dv_gobject))) { @@ -253,13 +253,13 @@ lttv_attribute_find_subdir(LttvAttribute *self, LttvAttributeName name) /*CHECK*/LttvAttribute* lttv_attribute_find_subdir_unnamed(LttvAttribute *self, LttvAttributeName name) { - unsigned i; + unsigned int i; Attribute a; LttvAttribute *new; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(likely(i != 0)) { a = g_array_index(self->attributes, Attribute, i - 1); if(likely(a.type == LTTV_GOBJECT && LTTV_IS_IATTRIBUTE(a.value.dv_gobject))) { @@ -277,11 +277,11 @@ gboolean lttv_attribute_find(LttvAttribute *self, LttvAttributeName name, LttvAttributeType t, LttvAttributeValue *v) { - unsigned i; + unsigned int i; Attribute *a; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(likely(i != 0)) { a = &g_array_index(self->attributes, Attribute, i - 1); if(unlikely(a->type != t)) return FALSE; @@ -301,7 +301,7 @@ lttv_attribute_find_unnamed(LttvAttribute *self, LttvAttributeName name, Attribute *a; - i = (unsigned)g_hash_table_lookup(self->names, GUINT_TO_POINTER(name)); + i = GPOINTER_TO_UINT(g_hash_table_lookup(self->names, GUINT_TO_POINTER(name))); if(likely(i != 0)) { a = &g_array_index(self->attributes, Attribute, i - 1); if(unlikely(a->type != t)) return FALSE; diff --git a/trunk/lttv/lttv/lttv/batchtest.c b/trunk/lttv/lttv/lttv/batchtest.c index 2f5fce83..be60bb41 100644 --- a/trunk/lttv/lttv/lttv/batchtest.c +++ b/trunk/lttv/lttv/lttv/batchtest.c @@ -25,6 +25,7 @@ #endif #include +#include #include #include #include @@ -170,7 +171,7 @@ gboolean trace_event(void __UNUSED__ *hook_data, void *call_data) LttEvent *e = ltt_tracefile_get_event(tfs->parent.tf); ltt_event_position(e, a_event_position); ltt_event_position_get(a_event_position, &tf, &nb_block, &offset, &tsc); - fprintf(stderr,"Event %s %lu.%09lu [%u 0x%x tsc %llu]\n", + fprintf(stderr, "Event %s %lu.%09lu [%u 0x%x tsc %" PRIu64 "]\n", g_quark_to_string(marker_get_info_from_id(tf->mdata, ltt_event_id(e))->name), tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec, @@ -334,7 +335,7 @@ static void compute_tracefile(LttTracefile *tracefile, void *hook_data) ltt_event_position(event, a_event_position); ltt_event_position_get(a_event_position, &tf_pos, &nb_block, &offset, &tsc); //fprintf(fp,"%s.%s: %llu %lu.%09lu position %u/%u\n", - fprintf(fp, "%s: %llu %lu.%09lu position %u/%u, tracefile %s\n", + fprintf(fp, "%s: %" PRIu64 " %lu.%09lu position %u/%u, tracefile %s\n", g_quark_to_string(minfo->name), tsc, (unsigned long)time.tv_sec, (unsigned long)time.tv_nsec, diff --git a/trunk/lttv/lttv/lttv/filter.c b/trunk/lttv/lttv/lttv/filter.c index 3c53e387..71eb619c 100644 --- a/trunk/lttv/lttv/lttv/filter.c +++ b/trunk/lttv/lttv/lttv/filter.c @@ -1891,7 +1891,7 @@ lttv_filter_tree_parse( gboolean lresult = FALSE, rresult = FALSE; - LttvTraceState *ts; + LttvTraceState *ts = NULL; LttvTracefileState *tfs = (LttvTracefileState*)context; if(tc) ts = (LttvTraceState*)tc; diff --git a/trunk/lttv/lttv/lttv/print.c b/trunk/lttv/lttv/lttv/print.c index 8bba6971..c678b4e4 100644 --- a/trunk/lttv/lttv/lttv/print.c +++ b/trunk/lttv/lttv/lttv/print.c @@ -42,6 +42,7 @@ #include #include #include +#include static inline void print_enum_events(LttEvent *e, struct marker_field *f, guint64 value, GString *s, LttvTracefileState *tfs) @@ -140,7 +141,7 @@ void lttv_print_field(LttEvent *e, struct marker_field *f, GString *s, if(name) g_string_append_printf(s, "%s = ", g_quark_to_string(name)); } - g_string_append_printf(s, "0x%llx", ltt_event_get_long_unsigned(e,f)); + g_string_append_printf(s, "0x%" PRIx64, ltt_event_get_long_unsigned(e,f)); //g_string_append_printf(s, type->fmt, ltt_event_get_long_unsigned(e,f)); break; @@ -271,12 +272,13 @@ void lttv_event_to_string(LttEvent *e, GString *s, g_quark_to_string(ltt_tracefile_name(tfs->parent.tf)), cpu); /* Print the process id and the state/interrupt type of the process */ - g_string_append_printf(s,", %u, %u, %s, %s, %u, 0x%llX, %s", process->pid, - process->tgid, - g_quark_to_string(process->name), - g_quark_to_string(process->brand), - process->ppid, process->current_function, - g_quark_to_string(process->state->t)); + g_string_append_printf(s,", %u, %u, %s, %s, %u, 0x%" PRIx64", %s", + process->pid, + process->tgid, + g_quark_to_string(process->name), + g_quark_to_string(process->brand), + process->ppid, process->current_function, + g_quark_to_string(process->state->t)); } if(marker_get_num_fields(info) == 0) return; diff --git a/trunk/lttv/lttv/lttv/state.c b/trunk/lttv/lttv/lttv/state.c index 1a3d907d..e6278ac8 100644 --- a/trunk/lttv/lttv/lttv/state.c +++ b/trunk/lttv/lttv/lttv/state.c @@ -32,6 +32,7 @@ #include #include #include +#include /* Comment : * Mathieu Desnoyers @@ -646,12 +647,12 @@ init(LttvTracesetState *self, LttvTraceset *ts) /* It's a Usertrace */ guint tid = ltt_tracefile_tid(tfcs->parent.tf); GTree *usertrace_tree = (GTree*)g_hash_table_lookup(tcs->usertraces, - (gconstpointer)tid); + GUINT_TO_POINTER(tid)); if(!usertrace_tree) { usertrace_tree = g_tree_new_full(compare_usertraces, NULL, free_usertrace_key, NULL); g_hash_table_insert(tcs->usertraces, - (gpointer)tid, usertrace_tree); + GUINT_TO_POINTER(tid), usertrace_tree); } LttTime *timestamp = g_new(LttTime, 1); *timestamp = ltt_interpolate_time_from_tsc(tfcs->parent.tf, @@ -761,7 +762,7 @@ static void write_process_state(gpointer key, gpointer value, for(i = 0 ; i < process->user_stack->len; i++) { address = g_array_index(process->user_stack, guint64, i); - fprintf(fp, " \n", + fprintf(fp, " \n", address); } @@ -815,7 +816,7 @@ void lttv_state_write(LttvTraceState *self, LttTime t, FILE *fp) else { ltt_event_position(e, ep); ltt_event_position_get(ep, &tf, &nb_block, &offset, &tsc); - fprintf(fp, " BLOCK=%u OFFSET=%u TSC=%llu/>\n", nb_block, offset, + fprintf(fp, " BLOCK=%u OFFSET=%u TSC=%" PRIu64 "/>\n", nb_block, offset, tsc); } } @@ -1536,7 +1537,7 @@ static void state_save(LttvTraceState *self, LttvAttribute *container) guint64 tsc; LttTracefile *tf; ltt_event_position_get(ep, &tf, &nb_block, &offset, &tsc); - g_info("Block %u offset %u tsc %llu time %lu.%lu", nb_block, offset, + g_info("Block %u offset %u tsc %" PRIu64 " time %lu.%lu", nb_block, offset, tsc, tfcs->parent.timestamp.tv_sec, tfcs->parent.timestamp.tv_nsec); } @@ -2242,7 +2243,8 @@ static LttvTracefileState *ltt_state_usertrace_find(LttvTraceState *tcs, * timestamp the lowest, but higher or equal to "timestamp". */ res.time = timestamp; res.best = NULL; - GTree *usertrace_tree = g_hash_table_lookup(tcs->usertraces, (gpointer)pid); + GTree *usertrace_tree = g_hash_table_lookup(tcs->usertraces, + GUINT_TO_POINTER(pid)); if(usertrace_tree) { g_tree_search(usertrace_tree, search_usertrace, &res); if(res.best) @@ -2571,7 +2573,7 @@ static gboolean soft_irq_raise(void *hook_data, void *call_data) } else { /* Fixup an incomplete irq table */ GString *string = g_string_new(""); - g_string_printf(string, "softirq %llu", softirq); + g_string_printf(string, "softirq %" PRIu64, softirq); submode = g_quark_from_string(string->str); g_string_free(string, TRUE); } @@ -2708,7 +2710,7 @@ static void pop_function(LttvTracefileState *tfs, guint64 funcptr) if(process->current_function != funcptr){ g_info("Different functions (%lu.%09lu): ignore it\n", tfs->parent.timestamp.tv_sec, tfs->parent.timestamp.tv_nsec); - g_info("process state has %llu when pop_function is %llu\n", + g_info("process state has %" PRIu64 " when pop_function is %" PRIu64 "\n", process->current_function, funcptr); g_info("{ %u, %u, %s, %s, %s }\n", process->pid, @@ -3957,7 +3959,7 @@ void lttv_state_traceset_seek_time_closest(LttvTracesetState *self, LttTime t) gboolean is_named; - LttvAttribute *saved_states_tree, *saved_state_tree, *closest_tree; + LttvAttribute *saved_states_tree, *saved_state_tree, *closest_tree = NULL; //g_tree_destroy(self->parent.pqueue); //self->parent.pqueue = g_tree_new(compare_tracefile); diff --git a/trunk/lttv/lttv/lttv/stats.c b/trunk/lttv/lttv/lttv/stats.c index 6aef4403..24b4ad4c 100644 --- a/trunk/lttv/lttv/lttv/stats.c +++ b/trunk/lttv/lttv/lttv/stats.c @@ -21,6 +21,7 @@ #endif #include +#include #include #include #include @@ -398,7 +399,7 @@ find_event_tree(LttvTracefileStats *tfcs, gint ret; ret = snprintf(fstring, MAX_64_HEX_STRING_LEN-1, - "0x%llX", function) > 0; + "0x%" PRIX64, function) > 0; g_assert(ret > 0); fstring[MAX_64_HEX_STRING_LEN-1] = '\0'; diff --git a/trunk/lttv/lttv/modules/gui/controlflow/drawing.c b/trunk/lttv/lttv/modules/gui/controlflow/drawing.c index cde87124..46c83b6e 100644 --- a/trunk/lttv/lttv/modules/gui/controlflow/drawing.c +++ b/trunk/lttv/lttv/modules/gui/controlflow/drawing.c @@ -431,7 +431,7 @@ 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 = (guint)user_data; + guint x = GPOINTER_TO_UINT(user_data); hashed_process_data->x.over = x; hashed_process_data->x.over_used = FALSE; @@ -467,7 +467,7 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState &x); g_hash_table_foreach(cfd->process_list->process_hash, set_last_start, - (gpointer)x); + GUINT_TO_POINTER(x)); } diff --git a/trunk/lttv/lttv/modules/gui/controlflow/eventhooks.c b/trunk/lttv/lttv/modules/gui/controlflow/eventhooks.c index db1604c4..287ddb1f 100644 --- a/trunk/lttv/lttv/modules/gui/controlflow/eventhooks.c +++ b/trunk/lttv/lttv/modules/gui/controlflow/eventhooks.c @@ -2590,7 +2590,8 @@ int after_chunk(void *hook_data, void *call_data) guint nb_trace = lttv_traceset_number(traceset); /* Only execute when called for the first trace's events request */ - if(!process_list->current_hash_data) return; + if(!process_list->current_hash_data) + return 0; for(i = 0 ; i < nb_trace ; i++) { g_free(process_list->current_hash_data[i]); diff --git a/trunk/lttv/lttv/modules/gui/controlflow/lttv_plugin_cfv.c b/trunk/lttv/lttv/modules/gui/controlflow/lttv_plugin_cfv.c index d8b005ab..c23cfabe 100644 --- a/trunk/lttv/lttv/modules/gui/controlflow/lttv_plugin_cfv.c +++ b/trunk/lttv/lttv/modules/gui/controlflow/lttv_plugin_cfv.c @@ -20,6 +20,7 @@ #include "lttv_plugin_cfv.h" #include #include "drawing.h" +#include "eventhooks.h" /* * forward definitions diff --git a/trunk/lttv/lttv/modules/gui/controlflow/processlist.c b/trunk/lttv/lttv/modules/gui/controlflow/processlist.c index 383c3e8e..506dae1c 100644 --- a/trunk/lttv/lttv/modules/gui/controlflow/processlist.c +++ b/trunk/lttv/lttv/modules/gui/controlflow/processlist.c @@ -215,9 +215,9 @@ static void update_pixmap_size_each(ProcessInfo *key, void update_pixmap_size(ProcessList *process_list, guint width) { - g_hash_table_foreach(process_list->process_hash, - (GHFunc)update_pixmap_size_each, - (gpointer)width); + g_hash_table_foreach(process_list->process_hash, + (GHFunc)update_pixmap_size_each, + GUINT_TO_POINTER(width)); } diff --git a/trunk/lttv/lttv/modules/gui/detailedevents/events.c b/trunk/lttv/lttv/modules/gui/detailedevents/events.c index 9376349c..22bb4208 100644 --- a/trunk/lttv/lttv/modules/gui/detailedevents/events.c +++ b/trunk/lttv/lttv/modules/gui/detailedevents/events.c @@ -55,6 +55,7 @@ #include #include #include +#include #include #include #include @@ -1226,7 +1227,7 @@ void tree_v_size_allocate_cb (GtkWidget *widget, GtkAllocation *alloc, gpointer g_debug("size allocate %p : last_num_visible_events : %d", event_viewer_data, last_num_visible_events); - g_debug("num_visible_events : %d, value %lu", + g_debug("num_visible_events : %d, value %f", event_viewer_data->num_visible_events, event_viewer_data->vadjust_c->value); @@ -1360,6 +1361,7 @@ static void get_events(double new_value, EventViewerData *event_viewer_data) break; case SCROLL_JUMP: g_debug("get_events : SCROLL_JUMP"); + relative_position = 0; seek_by_time = 1; break; case SCROLL_NONE: @@ -1416,7 +1418,7 @@ static void get_events(double new_value, EventViewerData *event_viewer_data) */ if(relative_position > 0) { guint count; - count += lttv_process_traceset_seek_n_forward(tsc, relative_position, + count = lttv_process_traceset_seek_n_forward(tsc, relative_position, events_check_handler, &event_viewer_data->tab->stop_foreground, event_viewer_data->main_win_filter, diff --git a/trunk/lttv/lttv/modules/gui/histogram/histobuttonwidget.c b/trunk/lttv/lttv/modules/gui/histogram/histobuttonwidget.c index 279be946..d4a87f51 100644 --- a/trunk/lttv/lttv/modules/gui/histogram/histobuttonwidget.c +++ b/trunk/lttv/lttv/modules/gui/histogram/histobuttonwidget.c @@ -29,12 +29,16 @@ #include "histobuttonwidget.h" #include "histodrawing.h" #include "histodrawitem.h" -#include "stock_zoom_in_24.xpm" -#include "stock_zoom_out_24.xpm" -#include "stock_zoom_fit_24.xpm" +extern void histogram_show(HistoControlFlowData *histocontrol_flow_data, + guint draw_begin, guint draw_end); + +#ifndef g_info #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format) +#endif +#ifndef g_debug #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format) +#endif /* Preallocated Size of the index_to_pixmap array */ #define ALLOCATE_PROCESSES 1000 @@ -113,7 +117,7 @@ static GtkWidget *xpm_label_box( gchar* xpm_filename, /* Now on to the image stuff */ - pixbufP = gdk_pixbuf_new_from_xpm_data((const char*)xpm_filename); + pixbufP = gdk_pixbuf_new_from_xpm_data((const char **)&xpm_filename); image = gtk_image_new_from_pixbuf(pixbufP); /* Create a label for the button */ @@ -148,9 +152,9 @@ ButtonWidget *histo_buttonwidget_construct(HistoControlFlowData *histocontrol_fl buttonwidget ->buttonFit =gtk_button_new (); /* This calls our box creating function */ - boxPlus = xpm_label_box (stock_zoom_in_24, "vertical"); - boxMinus = xpm_label_box (stock_zoom_out_24, "vertical"); - boxfit = xpm_label_box (stock_zoom_fit_24, "vertical"); + boxPlus = xpm_label_box ("stock_zoom_in_24.xpm", "vertical"); + boxMinus = xpm_label_box ("stock_zoom_out_24.xpm", "vertical"); + boxfit = xpm_label_box ("stock_zoom_fit_24.xpm", "vertical"); /* Pack and show all widgets */ gtk_widget_show (boxPlus); diff --git a/trunk/lttv/lttv/modules/gui/histogram/histodrawing.c b/trunk/lttv/lttv/modules/gui/histogram/histodrawing.c index 53addbce..0b2adcbe 100644 --- a/trunk/lttv/lttv/modules/gui/histogram/histodrawing.c +++ b/trunk/lttv/lttv/modules/gui/histogram/histodrawing.c @@ -36,8 +36,12 @@ #include "histoeventhooks.h" #include "histocfv.h" +#ifndef g_info #define g_info(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format) +#endif +#ifndef g_debug #define g_debug(format...) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, format) +#endif //FIXME // fixed #define TRACE_NUMBER 0 @@ -168,7 +172,7 @@ void histo_drawing_request_expose(EventsRequest *events_request, HistoControlFlowData *cfd = events_request->viewer_data; histoDrawing_t *drawing = cfd->drawing; - gint x, x_end, width; + guint x, x_end, width; LttvTracesetContext *tsc = (LttvTracesetContext*)tss; TimeWindow time_window = @@ -771,6 +775,7 @@ void histo_drawing_clear(histoDrawing_t *drawing,guint clear_from,guint clear_to TRUE, 0,0, drawing->drawing_area->allocation.width,drawing->drawing_area->allocation.height ); +*/ /* ask for the buffer to be redrawn */ //enabled again for histogram. @@ -1073,6 +1078,7 @@ histo_motion_notify_ruler(GtkWidget *widget, GdkEventMotion *event, gpointer use { //g_debug("motion"); //eventually follow mouse and show time here + return FALSE; } static gboolean @@ -1080,6 +1086,7 @@ histo_motion_notify_vertical_ruler(GtkWidget *widget, GdkEventMotion *event, gpo { //g_debug("motion"); //eventually follow mouse and show time here + return FALSE; } @@ -1141,7 +1148,7 @@ histo_expose_vertical_ruler( GtkWidget *widget, GdkEventExpose *event, gpointer drawing->vertical_ruler-> allocation.width-7, 1); - snprintf(text, 255, "%lu",0); + snprintf(text, 255, "%d", 0); pango_layout_set_text(layout, text, -1); pango_layout_get_pixel_extents(layout, &ink_rect, NULL); diff --git a/trunk/lttv/lttv/modules/gui/histogram/histoeventhooks.c b/trunk/lttv/lttv/modules/gui/histogram/histoeventhooks.c index b0781b10..05ef78db 100644 --- a/trunk/lttv/lttv/modules/gui/histogram/histoeventhooks.c +++ b/trunk/lttv/lttv/modules/gui/histogram/histoeventhooks.c @@ -615,7 +615,7 @@ gint histo_update_time_window_hook(void *hook_data, void *call_data) 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) @@ -834,6 +834,8 @@ gint histo_update_time_window_hook(void *hook_data, void *call_data) histo_drawing_update_vertical_ruler(drawing); */ +#endif + //disabled for histogram, always redraw whole screen. return 0; } @@ -1111,7 +1113,9 @@ int histo_after_chunk(void *hook_data, void *call_data) histoDrawing_t *drawing = histocontrol_flow_data->drawing; - if(!histocontrol_flow_data->chunk_has_begun) return; + if(!histocontrol_flow_data->chunk_has_begun) + return 0; + histocontrol_flow_data->chunk_has_begun = TRUE; if(tfc != NULL) diff --git a/trunk/lttv/lttv/modules/gui/interrupts/interrupts.c b/trunk/lttv/lttv/modules/gui/interrupts/interrupts.c index 949668bd..bea4a102 100644 --- a/trunk/lttv/lttv/modules/gui/interrupts/interrupts.c +++ b/trunk/lttv/lttv/modules/gui/interrupts/interrupts.c @@ -1014,7 +1014,7 @@ static gboolean DisplayViewer(void *hook_data, void *call_data) guint maxIRQduration; guint minIRQduration; double periodInSec; - int periodInNsec; + int periodInNsec = 0; char maxIrqHandler[80]; char minIrqHandler[80]; InterruptEventData *event_data = (InterruptEventData *)hook_data; @@ -1034,14 +1034,14 @@ static gboolean DisplayViewer(void *hook_data, void *call_data) maxIRQduration *= NANOSECONDS_PER_SECOND; maxIRQduration += element.max_irq_handler.duration.tv_nsec; - sprintf(maxIrqHandler, "%d [%d.%d - %d.%d]",maxIRQduration, element.max_irq_handler.start_time.tv_sec, \ + sprintf(maxIrqHandler, "%d [%lu.%lu - %lu.%lu]",maxIRQduration, element.max_irq_handler.start_time.tv_sec, \ element.max_irq_handler.start_time.tv_nsec, element.max_irq_handler.end_time.tv_sec, \ element.max_irq_handler.end_time.tv_nsec) ; minIRQduration = element.min_irq_handler.duration.tv_sec; minIRQduration *= NANOSECONDS_PER_SECOND; minIRQduration += element.min_irq_handler.duration.tv_nsec; - sprintf(minIrqHandler, "%d [%d.%d - %d.%d]",minIRQduration, element.min_irq_handler.start_time.tv_sec, \ + sprintf(minIrqHandler, "%d [%lu.%lu - %lu.%lu]",minIRQduration, element.min_irq_handler.start_time.tv_sec, \ element.min_irq_handler.start_time.tv_nsec, element.min_irq_handler.end_time.tv_sec, \ element.min_irq_handler.end_time.tv_nsec) ; diff --git a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c index 97e75561..a47307d2 100644 --- a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c +++ b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c @@ -764,7 +764,7 @@ void move_down_viewer(GtkWidget * widget, gpointer user_data) return; } else { LttvPluginTab *ptab; - ptab = (Tab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin"); + ptab = g_object_get_data(G_OBJECT(page), "Tab_Plugin"); tab = ptab->tab; } @@ -839,7 +839,7 @@ void delete_viewer(GtkWidget * widget, gpointer user_data) return; } else { LttvPluginTab *ptab; - ptab = (Tab *)g_object_get_data(G_OBJECT(page), "Tab_Plugin"); + ptab = g_object_get_data(G_OBJECT(page), "Tab_Plugin"); tab = ptab->tab; } @@ -2577,7 +2577,7 @@ void on_trace_facility_activate (GtkMenuItem *menuitem, gpointer user_data) { - g_info("Trace facility selector: %s\n"); + g_info("Trace facility selector: %s\n", ""); } @@ -2895,7 +2895,7 @@ on_unload_module_activate (GtkMenuItem *menuitem, GError *error = NULL; MainWindow * mw_data = get_window_data_struct((GtkWidget*)menuitem); - LttvLibrary *library; + LttvLibrary *library = NULL; { GPtrArray *name; guint nb,i; @@ -4349,10 +4349,10 @@ MainWindow *construct_main_window(MainWindow * parent) LttvIAttribute *attributes_global = LTTV_IATTRIBUTE(lttv_global_attributes()); - g_assert(attribute = - LTTV_ATTRIBUTE(lttv_iattribute_find_subdir( - LTTV_IATTRIBUTE(attributes_global), - LTTV_VIEWER_CONSTRUCTORS))); + attribute = LTTV_ATTRIBUTE(lttv_iattribute_find_subdir( + LTTV_IATTRIBUTE(attributes_global), + LTTV_VIEWER_CONSTRUCTORS)); + g_assert(attribute); name = g_quark_from_string("guievents"); type = lttv_iattribute_get_by_name(LTTV_IATTRIBUTE(attribute), diff --git a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index ffbf2917..83d35c96 100644 --- a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -240,10 +240,6 @@ static void destroy_walk(gpointer data, gpointer user_data) */ static void destroy() { - LttvAttributeValue value; - LttvTrace *trace; - GSList *iter = NULL; - lttv_option_remove("trace"); lttv_hooks_remove_data(main_hooks, window_creation_hook, NULL); diff --git a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c index 529e4ac6..ebbaa06f 100644 --- a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c +++ b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.c @@ -1113,7 +1113,6 @@ void events_request_free(EventsRequest *events_request) if(events_request->end_position != NULL) lttv_traceset_context_position_destroy(events_request->end_position); if(events_request->hooks != NULL) { - guint i; GArray *hooks = events_request->hooks; lttv_trace_hook_remove_all(&hooks); g_array_free(events_request->hooks, TRUE); diff --git a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h index df04a3f0..30fa5c6a 100644 --- a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h +++ b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h @@ -850,10 +850,7 @@ static inline void lttvwindow_events_request_enable(void) } - - - - - +void current_position_change_manager(Tab *tab, + LttvTracesetContextPosition *pos); #endif //LTTVWINDOW_H diff --git a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c index 375eb689..787c5a70 100644 --- a/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c +++ b/trunk/lttv/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindowtraces.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -79,7 +80,7 @@ __EXPORT LttvTrace *lttvwindowtraces_get_trace_by_name(gchar *path) for(i=0;i= 0); attribute = @@ -805,7 +807,7 @@ void lttvwindowtraces_call_before_chunk(LttvAttributeName module_name, LTTV_EVENT_HOOK_BY_ID_CHANNEL, &value); if(type == LTTV_POINTER) { - event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer); + event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer); } lttv_process_traceset_begin(tsc, @@ -829,7 +831,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name, LttvHooks *after_chunk_trace=NULL; LttvHooks *after_chunk_tracefile=NULL; LttvHooks *event_hook=NULL; - LttvHooksById *event_hook_by_id_channel=NULL; + LttvHooksByIdChannelArray *event_hook_by_id_channel=NULL; module_attribute = LTTV_ATTRIBUTE(lttv_iattribute_find_subdir(LTTV_IATTRIBUTE(g_attribute), @@ -874,7 +876,7 @@ void lttvwindowtraces_call_after_chunk(LttvAttributeName module_name, LTTV_EVENT_HOOK_BY_ID_CHANNEL, &value); if(type == LTTV_POINTER) { - event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer); + event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer); } lttv_process_traceset_end(tsc, @@ -1832,7 +1834,7 @@ void lttvwindowtraces_unregister_computation_hooks &value); g_assert(result); - LttvHooksById *event_hook_by_id_channel = (LttvHooksById*)*(value.v_pointer); + LttvHooksByIdChannelArray *event_hook_by_id_channel = (LttvHooksByIdChannelArray*)*(value.v_pointer); if(event_hook_by_id_channel != NULL) lttv_hooks_by_id_channel_destroy(event_hook_by_id_channel); diff --git a/trunk/lttv/lttv/modules/gui/resourceview/cfv.h b/trunk/lttv/lttv/modules/gui/resourceview/cfv.h index 46bc8043..a03eb190 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/cfv.h +++ b/trunk/lttv/lttv/modules/gui/resourceview/cfv.h @@ -93,6 +93,6 @@ static inline ProcessList *guicontrolflow_get_process_list return control_flow_data->process_list ; } - +ControlFlowData *resourceview(LttvPluginTab *ptab); #endif // _CFV_H diff --git a/trunk/lttv/lttv/modules/gui/resourceview/drawing.c b/trunk/lttv/lttv/modules/gui/resourceview/drawing.c index 2959cac7..2d3b4a1b 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/drawing.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/drawing.c @@ -482,7 +482,7 @@ static void set_last_start(gpointer key, gpointer value, gpointer user_data) { //ResourceInfo *process_info = (ResourceInfo*)key; HashedResourceData *hashed_process_data = (HashedResourceData*)value; - guint x = (guint)(gulong)user_data; + guint x = GPOINTER_TO_UINT(user_data); hashed_process_data->x.over = x; hashed_process_data->x.over_used = FALSE; @@ -521,7 +521,7 @@ void drawing_data_request_begin(EventsRequest *events_request, LttvTracesetState for(i=0; iprocess_list->restypes[i].hash_table, set_last_start, - (gpointer)(gulong)x); + GUINT_TO_POINTER(x)); } } diff --git a/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c b/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c index d174da03..d0c87f6a 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/eventhooks.c @@ -56,6 +56,7 @@ #include #include #include +#include //#include @@ -92,7 +93,6 @@ extern GSList *g_legend_list; static gint background_ready(void *hook_data, void *call_data) { ControlFlowData *resourceview_data = (ControlFlowData *)hook_data; - LttvTrace *trace = (LttvTrace*)call_data; resourceview_data->background_info_waiting--; @@ -621,6 +621,10 @@ int after_schedchange_hook(void *hook_data, void *call_data) return 0; } +int before_execmode_hook_irq(void *hook_data, void *call_data); +int before_execmode_hook_soft_irq(void *hook_data, void *call_data); +int before_execmode_hook_trap(void *hook_data, void *call_data); + /* before_execmode_hook * * This function basically draw lines and icons. Two types of lines are drawn : @@ -861,7 +865,7 @@ int before_execmode_hook_irq(void *hook_data, void *call_data) GQuark name; { gchar *str; - str = g_strdup_printf("IRQ %llu [%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->irq_names[irq])); name = g_quark_from_string(str); g_free(str); } @@ -2115,7 +2119,8 @@ int after_chunk(void *hook_data, void *call_data) guint nb_trace = lttv_traceset_number(traceset); /* Only execute when called for the first trace's events request */ - if(!process_list->current_hash_data) return; + if(!process_list->current_hash_data) + return 0; for(i = 0 ; i < nb_trace ; i++) { g_free(process_list->current_hash_data[i]); diff --git a/trunk/lttv/lttv/modules/gui/resourceview/lttv_plugin_cfv.c b/trunk/lttv/lttv/modules/gui/resourceview/lttv_plugin_cfv.c index ca96455a..4b5ae2ce 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/lttv_plugin_cfv.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/lttv_plugin_cfv.c @@ -20,6 +20,7 @@ #include "lttv_plugin_cfv.h" #include #include "drawing.h" +#include "eventhooks.h" /* * forward definitions diff --git a/trunk/lttv/lttv/modules/gui/resourceview/processlist.c b/trunk/lttv/lttv/modules/gui/resourceview/processlist.c index dec03cfc..1b07852c 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/processlist.c +++ b/trunk/lttv/lttv/modules/gui/resourceview/processlist.c @@ -246,9 +246,9 @@ void update_pixmap_size(ProcessList *process_list, guint width) { int i; for(i=0; irestypes[i].hash_table, - (GHFunc)update_pixmap_size_each, - (gpointer)width); + g_hash_table_foreach(process_list->restypes[i].hash_table, + (GHFunc)update_pixmap_size_each, + GUINT_TO_POINTER(width)); } } diff --git a/trunk/lttv/lttv/modules/gui/resourceview/processlist.h b/trunk/lttv/lttv/modules/gui/resourceview/processlist.h index 2070a9c6..ce32e16e 100644 --- a/trunk/lttv/lttv/modules/gui/resourceview/processlist.h +++ b/trunk/lttv/lttv/modules/gui/resourceview/processlist.h @@ -299,6 +299,10 @@ static inline GHashTable *resourcelist_get_resource_hash_table(ControlFlowData * return resourceview_data->process_list->restypes[type].hash_table; } - +HashedResourceData *resourcelist_obtain_cpu(ControlFlowData *resourceview_data, guint trace_num, guint id); +HashedResourceData *resourcelist_obtain_irq(ControlFlowData *resourceview_data, guint trace_num, guint id); +HashedResourceData *resourcelist_obtain_soft_irq(ControlFlowData *resourceview_data, guint trace_num, guint id); +HashedResourceData *resourcelist_obtain_trap(ControlFlowData *resourceview_data, guint trace_num, guint id); +HashedResourceData *resourcelist_obtain_bdev(ControlFlowData *resourceview_data, guint trace_num, guint id); #endif // _PROCESS_LIST_H diff --git a/trunk/lttv/lttv/modules/text/precomputeState.c b/trunk/lttv/lttv/modules/text/precomputeState.c index 14b207c0..f23937b9 100644 --- a/trunk/lttv/lttv/modules/text/precomputeState.c +++ b/trunk/lttv/lttv/modules/text/precomputeState.c @@ -93,7 +93,7 @@ static gboolean write_traceset_footer(void *hook_data, void *call_data) { LttvTracesetContext *tc = (LttvTracesetContext *)call_data; GQuark q; - gchar *string; + const gchar *string; if(a_raw) { diff --git a/trunk/lttv/lttv/modules/text/textDump.c b/trunk/lttv/lttv/modules/text/textDump.c index ec0c563c..ddee070b 100644 --- a/trunk/lttv/lttv/modules/text/textDump.c +++ b/trunk/lttv/lttv/modules/text/textDump.c @@ -38,6 +38,7 @@ #include #include #include +#include static gboolean a_noevent, @@ -79,7 +80,7 @@ print_path_tree(FILE *fp, GString *indent, LttvAttribute *tree) if(is_named) { g_string_sprintfa(indent, "/%s", g_quark_to_string(name)); } else { - g_string_sprintfa(indent, "/%s", name); + g_string_sprintfa(indent, "/%" PRIu32, (guint32) name); } switch(type) { @@ -146,7 +147,8 @@ print_tree(FILE *fp, GString *indent, LttvAttribute *tree) if(is_named) fprintf(fp, "%s%s: ", indent->str, g_quark_to_string(name)); else - fprintf(fp, "%s%lu: ", indent->str, name); + fprintf(fp, "%s%" PRIu32 ": ", indent->str, + (guint32) name); switch(type) { case LTTV_INT: @@ -205,8 +207,6 @@ print_stats(FILE *fp, LttvTracesetStats *tscs) GString *indent; - LttSystemDescription *desc; - if(tscs->stats == NULL) return; indent = g_string_new(""); fprintf(fp, "Traceset statistics:\n\n"); @@ -222,6 +222,7 @@ print_stats(FILE *fp, LttvTracesetStats *tscs) for(i = 0 ; i < nb ; i++) { tcs = (LttvTraceStats *)(LTTV_TRACESET_CONTEXT(tscs)->traces[i]); #if 0 //FIXME + LttSystemDescription *desc; desc = ltt_trace_system_description(tcs->parent.parent.t); LttTime start_time = ltt_trace_system_description_trace_start_time(desc); fprintf(fp, "Trace on system %s at time %lu.%09lu :\n", @@ -289,8 +290,8 @@ static gboolean write_traceset_footer(void *hook_data, void *call_data) static gboolean write_trace_header(void *hook_data, void *call_data) { - LttvTraceContext *tc = (LttvTraceContext *)call_data; #if 0 //FIXME + LttvTraceContext *tc = (LttvTraceContext *)call_data; LttSystemDescription *system = ltt_trace_system_description(tc->t); fprintf(a_file," Trace from %s in %s\n%s\n\n", diff --git a/trunk/lttv/lttv/modules/text/textFilter.c b/trunk/lttv/lttv/modules/text/textFilter.c index ca613ac6..4590a76a 100644 --- a/trunk/lttv/lttv/modules/text/textFilter.c +++ b/trunk/lttv/lttv/modules/text/textFilter.c @@ -54,7 +54,7 @@ static char *a_file_name = NULL, *a_string = NULL; -static LttvHooks +static LttvHooks __attribute__ ((__unused__)) *before_traceset, *event_hook;