diff options
author | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-04-19 23:22:41 +0200 |
---|---|---|
committer | Jiri Olsa <Jiri Olsa jolsa@redhat.com> | 2011-04-19 23:22:41 +0200 |
commit | 73eaae45cbc65f3269c54273849d42a3719c357c (patch) | |
tree | 3a92cf74e44d2e16c38041446bf9676da27277ac | |
parent | ea6b29bc0d4af32aea49b3ab60752dbba751d701 (diff) | |
download | latrace-73eaae45cbc65f3269c54273849d42a3719c357c.tar.gz latrace-73eaae45cbc65f3269c54273849d42a3719c357c.tar.xz latrace-73eaae45cbc65f3269c54273849d42a3719c357c.zip |
prevent gcc warning with single printf like arg passing
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/audit.c | 6 | ||||
-rw-r--r-- | src/stats.c | 13 |
3 files changed, 13 insertions, 9 deletions
@@ -1,3 +1,6 @@ +2011-04-19 Jiri Olsa <olsajiri@gmail.com> + * prevent gcc warning with single printf like arg passing + 2011-04-16 Jiri Olsa <olsajiri@gmail.com> * fix display of char arguments * add threads fifo management to special directory diff --git a/src/audit.c b/src/audit.c index 7f94fc5..0037c52 100644 --- a/src/audit.c +++ b/src/audit.c @@ -265,7 +265,7 @@ static unsigned int la_symbind(ElfW(Sym) *sym, const char *symname) void la_activity(uintptr_t *cookie, unsigned int act) { - PRINT_VERBOSE(&cfg, 2, "entry\n"); + PRINT_VERBOSE(&cfg, 2, "%s\n", "entry"); } char* la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) @@ -278,12 +278,12 @@ char* la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) void la_preinit(uintptr_t *__cookie) { - PRINT_VERBOSE(&cfg, 2, "entry\n"); + PRINT_VERBOSE(&cfg, 2, "%s\n", "entry"); } unsigned int la_objclose(uintptr_t *__cookie) { - PRINT_VERBOSE(&cfg, 2, "entry\n"); + PRINT_VERBOSE(&cfg, 2, "%s\n", "entry"); return 0; } diff --git a/src/stats.c b/src/stats.c index a70ef4e..b1c8dda 100644 --- a/src/stats.c +++ b/src/stats.c @@ -91,7 +91,7 @@ int lt_stats_alloc(struct lt_config_app *cfg, struct lt_thread *t) t->sym_max += LT_SYM_HMAX; hdestroy_r(&t->sym_htab); - PRINT_VERBOSE(cfg, 1, "creating new hash table\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "creating new hash table"); if (!hcreate_r(t->sym_max, &t->sym_htab)) { perror("hcreate_r failed"); @@ -126,7 +126,7 @@ int lt_stats_alloc(struct lt_config_app *cfg, struct lt_thread *t) } } - PRINT_VERBOSE(cfg, 1, "reallocation ok\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "reallocation ok"); return 0; } @@ -244,7 +244,8 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t) struct timeval tv_thread_accu = { 0, 0}; float time_global; - PRINT_VERBOSE(cfg, 1, "counting total time\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "counting total time"); + for(i = 0; i < t->sym_cnt; i++) { struct lt_stats_sym *sym = t->sym_array[i]; tv_add(&tv_thread_accu, &tv_thread_accu, &sym->tv_all); @@ -252,7 +253,7 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t) time_global = tv_thread_accu.tv_sec * 1000000 + tv_thread_accu.tv_usec; - PRINT_VERBOSE(cfg, 1, "counting post mortem statistics\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "counting post mortem statistics"); for(i = 0; i < t->sym_cnt; i++) { struct lt_stats_sym *sym = t->sym_array[i]; @@ -262,12 +263,12 @@ static int lt_stats_show_thread(struct lt_config_app *cfg, struct lt_thread *t) sym->usec_call = time_sym/sym->call; } - PRINT_VERBOSE(cfg, 1, "sorting\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "sorting"); csort = cfg->csort; qsort(t->sym_array, t->sym_cnt, sizeof(struct lt_stats_sym*), qsort_compar); - PRINT_VERBOSE(cfg, 1, "printing\n"); + PRINT_VERBOSE(cfg, 1, "%s\n", "printing"); tv_sub(&tv_thread_real, &t->tv_stop, &t->tv_start); printf("\nThread %d (runtime %u.%06u sec)\n", |