]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fixes for compilation warnings from the apparently very strict
authorJulian Seward <jseward@acm.org>
Sat, 1 Nov 2008 23:55:32 +0000 (23:55 +0000)
committerJulian Seward <jseward@acm.org>
Sat, 1 Nov 2008 23:55:32 +0000 (23:55 +0000)
gcc-4.3.2 shipped with Ubuntu 8.10.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8723

auxprogs/valgrind-listener.c
callgrind/clo.c
callgrind/debug.c
callgrind/events.c
coregrind/m_main.c

index 11d4ca7e01d28755bf9a1d4389a2c31c186b4ea5..58db634353cb9287b5ea3d3fcbb95c203d42f403 100644 (file)
@@ -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);
index 1d21a654b9b440ed4e77acc93d9a58e8972ec9f0..238d872fdabf7b2a34239f9f38df8362d4ed1739 100644 (file)
@@ -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;i<NODE_DEGREE;i++) {
index f9bb820c169afd98a2ba49342ba8d6025f0409df..9a490816f1b36a2f7d7b6308de7b5afc14f614d7 100644 (file)
@@ -41,7 +41,7 @@ static void print_indent(int s)
     /* 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 @@ 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");
index 3f6abbb5c4a1ac41414cab644d1acf15ebfa3e79..9dfdd31cbec55bd674aab308cd38b39299a2c7ff 100644 (file)
@@ -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;
 
index adf0be836bff69122638cf3146757f531dd34512..4436d11990c178e16c3ca6a2b6aee97172bfeaae 100644 (file)
@@ -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);