]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a compiler warning about an incompatible format.
authorFlorian Krohm <florian@eich-krohm.de>
Sun, 4 Jan 2015 22:47:32 +0000 (22:47 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Sun, 4 Jan 2015 22:47:32 +0000 (22:47 +0000)
Shows up on 32-bit builds only.

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

drd/tests/local_static.cpp

index 86c0fc1273c24d2cf1029d7d3244a409568cce05..e84a3158b242fbfc667342ba0e1410009e76a587 100644 (file)
@@ -35,8 +35,8 @@ int main(int, char**)
   for (std::vector<pthread_t>::iterator p = thread.begin(); p != thread.end();
        p++) {
     if (pthread_create(&*p, 0, thread_func, 0) != 0) {
-      fprintf(stderr, "Creation of thread %ld failed\n",
-              &*p - &*thread.begin());
+      fprintf(stderr, "Creation of thread %d failed\n",
+              (int)(&*p - &*thread.begin()));
       return 1;
     }
   }