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 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c
index 11d4ca7..58db634 100644
--- a/auxprogs/valgrind-listener.c
+++ b/auxprogs/valgrind-listener.c
@@ -128,7 +128,8 @@
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 1d21a65..238d872 100644
--- a/callgrind/clo.c
+++ b/callgrind/clo.c
@@ -279,7 +279,7 @@
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;i<NODE_DEGREE;i++) {
diff --git a/callgrind/debug.c b/callgrind/debug.c
index f9bb820..9a49081 100644
--- a/callgrind/debug.c
+++ b/callgrind/debug.c
@@ -41,7 +41,7 @@
/* max of 40 spaces */
char sp[] = " ";
if (s>40) 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 @@
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 3f6abbb..9dfdd31 100644
--- a/callgrind/events.c
+++ b/callgrind/events.c
@@ -180,7 +180,7 @@
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 @@
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 adf0be8..4436d11 100644
--- a/coregrind/m_main.c
+++ b/coregrind/m_main.c
@@ -231,7 +231,7 @@
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);