forked from Imagelibrary/rtems
Use %zu instead of %d to print size_t's.
This commit is contained in:
@@ -52,7 +52,7 @@ static void test_realloc(void)
|
||||
p2 = realloc(p1, i);
|
||||
if (p2 != p1)
|
||||
printf( "realloc - failed grow in place: "
|
||||
"%p != realloc(%p,%d)\n", p1, p2, i);
|
||||
"%p != realloc(%p,%zu)\n", p1, p2, i);
|
||||
p1 = p2;
|
||||
}
|
||||
free(p1);
|
||||
@@ -63,7 +63,7 @@ static void test_realloc(void)
|
||||
p2 = realloc(p1, i);
|
||||
if (p2 != p1)
|
||||
printf( "realloc - failed shrink in place: "
|
||||
"%p != realloc(%p,%d)\n", p1, p2, i);
|
||||
"%p != realloc(%p,%zu)\n", p1, p2, i);
|
||||
p1 = p2;
|
||||
}
|
||||
free(p1);
|
||||
|
||||
@@ -394,7 +394,7 @@ int main(
|
||||
test_extend( "/tmp/joel", max_size - 1 );
|
||||
test_cat( "/tmp/joel", max_size / 2, 1024 );
|
||||
} else {
|
||||
printf( "Skipping maximum file size test since max_size is %d bytes\n", max_size );
|
||||
printf( "Skipping maximum file size test since max_size is %zu bytes\n", max_size );
|
||||
puts("That is likely to be bigger than the available RAM on many targets." );
|
||||
}
|
||||
|
||||
|
||||
@@ -291,7 +291,7 @@ rtems_test_pause();
|
||||
);
|
||||
if (status != RTEMS_SUCCESSFUL)
|
||||
{
|
||||
printf("TA1 - msq que size: %d\n", queue_size);
|
||||
printf("TA1 - msq que size: %zu\n", queue_size);
|
||||
directive_failed( status, "rtems_message_queue_create of Q1" );
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
|
||||
puts( "\n\n*** TEST 48 ***" );
|
||||
|
||||
printf( "Largest C program heap block available: %d\n", malloc_free_space() );
|
||||
printf( "Largest C program heap block available: %zu\n", malloc_free_space() );
|
||||
for (i=0 ; i<MAX ; i++ ) {
|
||||
sc = rtems_semaphore_create(
|
||||
rtems_build_name('s', 'e', 'm', ' '),
|
||||
@@ -54,7 +54,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
puts( "Created all semaphores allowed in this test" );
|
||||
|
||||
printf( "%d semaphores created\n", i );
|
||||
printf( "Largest C program heap block available: %d\n", malloc_free_space() );
|
||||
printf( "Largest C program heap block available: %zu\n", malloc_free_space() );
|
||||
|
||||
for ( i-- ; i ; i-- ) {
|
||||
sc = rtems_semaphore_delete( Semaphores[i] );
|
||||
@@ -66,7 +66,7 @@ rtems_task Init(rtems_task_argument ignored)
|
||||
}
|
||||
|
||||
printf( "%d semaphores successfully deleted\n", created );
|
||||
printf( "Largest C program heap block available: %d\n", malloc_free_space() );
|
||||
printf( "Largest C program heap block available: %zu\n", malloc_free_space() );
|
||||
|
||||
puts( "*** END OF TEST 48 ***" );
|
||||
rtems_test_exit( 0 );
|
||||
|
||||
Reference in New Issue
Block a user