From: Julian Seward Date: Sat, 1 Nov 2008 23:55:32 +0000 (+0000) Subject: Fixes for compilation warnings from the apparently very strict X-Git-Tag: svn/VALGRIND_3_4_0~171 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b9a06673069abcf733f7d285b6d8389e36764c54;p=thirdparty%2Fvalgrind.git Fixes for compilation warnings from the apparently very strict gcc-4.3.2 shipped with Ubuntu 8.10. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8723 --- diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c index 11d4ca7e01..58db634353 100644 --- a/auxprogs/valgrind-listener.c +++ b/auxprogs/valgrind-listener.c @@ -128,7 +128,8 @@ static void copyout ( char* buf, int nbuf ) if (buf[i] == '\n') { fprintf(stdout, "\n(%d) ", conn_count); } else { - fwrite(&buf[i], 1, 1, stdout); + __attribute__((unused)) size_t ignored + = fwrite(&buf[i], 1, 1, stdout); } } fflush(stdout); diff --git a/callgrind/clo.c b/callgrind/clo.c index 1d21a654b9..238d872fda 100644 --- a/callgrind/clo.c +++ b/callgrind/clo.c @@ -279,7 +279,7 @@ static void print_config_node(int s, config_node* node) char sp[] = " "; if (s>40) s=40; - VG_(printf)(sp+40-s); + VG_(printf)("%s", sp+40-s); VG_(printf)("'%s'/%d\n", node->name, node->length); } for(i=0;i40) s=40; - VG_(printf)(sp+40-s); + VG_(printf)("%s", sp+40-s); } void CLG_(print_bb)(int s, BB* bb) @@ -168,7 +168,7 @@ void CLG_(print_eventset)(int s, EventSet* es) if (es->e[i-1].nextTop == i) VG_(printf)("| "); } - VG_(printf)(es->e[i].type->name); + VG_(printf)("%s", es->e[i].type->name); } } VG_(printf)("\n"); diff --git a/callgrind/events.c b/callgrind/events.c index 3f6abbb5c4..9dfdd31cbe 100644 --- a/callgrind/events.c +++ b/callgrind/events.c @@ -180,7 +180,7 @@ Int CLG_(sprint_eventset)(Char* buf, EventSet* es) for(i=0; i< es->size; i++) { if (pos>0) buf[pos++] = ' '; - pos += VG_(sprintf)(buf + pos, es->e[i].type->name); + pos += VG_(sprintf)(buf + pos, "%s", es->e[i].type->name); } buf[pos] = 0; @@ -538,7 +538,7 @@ Int CLG_(sprint_eventmapping)(Char* buf, EventMapping* em) for(i=0; i< em->size; i++) { if (pos>0) buf[pos++] = ' '; - pos += VG_(sprintf)(buf + pos, em->set->e[em->index[i]].type->name); + pos += VG_(sprintf)(buf + pos, "%s", em->set->e[em->index[i]].type->name); } buf[pos] = 0; diff --git a/coregrind/m_main.c b/coregrind/m_main.c index adf0be836b..4436d11990 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -231,7 +231,7 @@ static void usage_NORETURN ( Bool debug_help ) VG_(printf)(" (none)\n"); } if (debug_help) { - VG_(printf)(usage2); + VG_(printf)("%s", usage2); if (VG_(details).name) { VG_(printf)(" debugging options for %s:\n", VG_(details).name);