]> granicus.if.org Git - libatomic_ops/commitdiff
Fix variable type to match printf format specifier in test_stack
authorIvan Maidanski <ivmai@mail.ru>
Mon, 8 Oct 2012 20:06:19 +0000 (00:06 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 8 Oct 2012 20:06:19 +0000 (00:06 +0400)
* tests/test_stack.c (run_one_test): Change type of "index" local
variable from long to int to match printf format specifier (when
VERBOSE defined); cast from "arg" pointer to integer via size_t (to
avoid 64-bit compiler warning).

tests/test_stack.c

index ff18fa6bdccef59bd61d35cc13630f9877dafd7b..3df4b6aa7fe6f5c71729e8aa2d92a99e8484a0af 100644 (file)
@@ -169,7 +169,7 @@ volatile AO_t ops_performed = 0;
 #endif
 {
   list_element * t[MAX_NTHREADS + 1];
-  long index = (long)arg;
+  int index = (int)(size_t)arg;
   int i;
   int j = 0;