[rtems commit] spcpuset01: Use %zd for size_t to eliminate warning

Joel Sherrill joel at rtems.org
Thu Sep 4 13:59:25 UTC 2014


Module:    rtems
Branch:    master
Commit:    a864016f3add3abf91a7cf49513fd6d2afe90979
Changeset: http://git.rtems.org/rtems/commit/?id=a864016f3add3abf91a7cf49513fd6d2afe90979

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Wed Sep  3 10:21:21 2014 -0500

spcpuset01: Use %zd for size_t to eliminate warning

---

 testsuites/sptests/spcpuset01/init.c |    4 ++--
 testsuites/sptests/spcpuset01/test.c |    8 ++++----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/testsuites/sptests/spcpuset01/init.c b/testsuites/sptests/spcpuset01/init.c
index 0102e6c..3ed4d47 100644
--- a/testsuites/sptests/spcpuset01/init.c
+++ b/testsuites/sptests/spcpuset01/init.c
@@ -77,7 +77,7 @@ static void test_cpu_set_case_1(size_t cpu)
   /*
    * Set to all zeros and verify
    */
-  printf( "Exercise CPU_ZERO, CPU_SET(%u), and CPU_ISET\n", cpu );
+  printf( "Exercise CPU_ZERO, CPU_SET(%zu), and CPU_ISET\n", cpu );
   CPU_ZERO(&set1);
   CPU_SET(cpu, &set1);
 
@@ -99,7 +99,7 @@ static void test_cpu_clr_case_1(size_t cpu)
   /*
    * Set to all zeros and verify
    */
-  printf( "Exercise CPU_FILL, CPU_CLR(%u), and CPU_ISET\n", cpu );
+  printf( "Exercise CPU_FILL, CPU_CLR(%zu), and CPU_ISET\n", cpu );
   CPU_FILL(&set1);
   CPU_CLR(cpu, &set1);
 
diff --git a/testsuites/sptests/spcpuset01/test.c b/testsuites/sptests/spcpuset01/test.c
index 34c539c..0083312 100644
--- a/testsuites/sptests/spcpuset01/test.c
+++ b/testsuites/sptests/spcpuset01/test.c
@@ -33,7 +33,7 @@ void test_cpu_and_case_1(size_t cpu1, size_t cpu2)
   size_t i;
 
   /*  AND set1 and set2 */
-  printf( "Exercise CPU_AND with bits %d,%d\n",cpu1,cpu2 );
+  printf( "Exercise CPU_AND with bits %zd,%zd\n", cpu1, cpu2 );
   CPU_AND(&set3, &set1, &set2);
 
   /* test if all bits clear except cpu1 */
@@ -51,7 +51,7 @@ void test_cpu_nand_case_1(size_t cpu1, size_t cpu2)
   size_t i;
 
    /*  NAND set1 and set2 */
-  printf( "Exercise CPU_NAND with bits %d,%d\n",cpu1,cpu2 );
+  printf( "Exercise CPU_NAND with bits %zd,%zd\n", cpu1, cpu2 );
   CPU_NAND(&set3, &set1, &set2);
 
   /* test if all bits clear except cpu1 */
@@ -68,7 +68,7 @@ void test_cpu_or_case_1(size_t cpu1, size_t cpu2)
   size_t i;
 
   /*  OR set1 and set2 */
-  printf( "Exercise CPU_OR with bits %d,%d\n",cpu1,cpu2 );
+  printf( "Exercise CPU_OR with bits %zd,%zd\n", cpu1, cpu2 );
   CPU_OR(&set3, &set1, &set2);
 
   /* test if all bits clear except cpu1 */
@@ -85,7 +85,7 @@ void test_cpu_xor_case_1(size_t cpu1, size_t cpu2)
   size_t i;
 
   /*  XOR set1 and set2 */
-  printf( "Exercise CPU_XOR with bits %d,%d\n",cpu1,cpu2 );
+  printf( "Exercise CPU_XOR with bits %zd,%zd\n", cpu1, cpu2 );
   CPU_XOR(&set3, &set1, &set2);
 
   /* test if all bits clear except cpu1 */



More information about the vc mailing list