forked from Imagelibrary/rtems
corrected printf format to avoid warning
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define MUTEX_BAD_ID -2
|
#define MUTEX_BAD_ID 0xfffffffe
|
||||||
|
|
||||||
void Print_mutexattr(
|
void Print_mutexattr(
|
||||||
char *msg,
|
char *msg,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void *POSIX_Init(
|
|||||||
/* switch to task 1 */
|
/* switch to task 1 */
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Init: Got the key value of %d\n",
|
printf( "Init: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
|
|
||||||
remaining = sleep( 3 );
|
remaining = sleep( 3 );
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void *Task_1(
|
|||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Task_1: Got the key value of %d\n",
|
printf( "Task_1: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
if ( status )
|
if ( status )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ void *Task_2(
|
|||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Task_2: Got the key value of %d\n",
|
printf( "Task_2: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
if ( status )
|
if ( status )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ TEST_EXTERN rtems_unsigned8 Area_1[4096] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
TEST_EXTERN rtems_unsigned8 Area_2[274] CPU_STRUCTURE_ALIGNMENT;
|
TEST_EXTERN rtems_unsigned8 Area_2[274] CPU_STRUCTURE_ALIGNMENT;
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
#define Put_address_from_area_2( _to_be_printed ) \
|
#define Put_address_from_area_2( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -71,15 +71,15 @@ TEST_EXTERN rtems_unsigned8 Area_4[8192] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#define BASE_PRIORITY 140
|
#define BASE_PRIORITY 140
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
#define Put_address_from_area_2( _to_be_printed ) \
|
#define Put_address_from_area_2( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
||||||
|
|
||||||
#define Put_address_from_area_3( _to_be_printed ) \
|
#define Put_address_from_area_3( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_3 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_3 )
|
||||||
|
|
||||||
#define Put_address_from_area_4( _to_be_printed ) \
|
#define Put_address_from_area_4( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_4 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_4 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ TEST_EXTERN rtems_unsigned8 Area_1[64000] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#define BASE_PRIORITY 140
|
#define BASE_PRIORITY 140
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#define MUTEX_BAD_ID -2
|
#define MUTEX_BAD_ID 0xfffffffe
|
||||||
|
|
||||||
void Print_mutexattr(
|
void Print_mutexattr(
|
||||||
char *msg,
|
char *msg,
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void *POSIX_Init(
|
|||||||
/* switch to task 1 */
|
/* switch to task 1 */
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Init: Got the key value of %d\n",
|
printf( "Init: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
|
|
||||||
remaining = sleep( 3 );
|
remaining = sleep( 3 );
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ void *Task_1(
|
|||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Task_1: Got the key value of %d\n",
|
printf( "Task_1: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
if ( status )
|
if ( status )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ void *Task_2(
|
|||||||
assert( !status );
|
assert( !status );
|
||||||
|
|
||||||
key_data = pthread_getspecific( Key_id );
|
key_data = pthread_getspecific( Key_id );
|
||||||
printf( "Task_2: Got the key value of %d\n",
|
printf( "Task_2: Got the key value of %ld\n",
|
||||||
(rtems_unsigned32 *)key_data - Data_array );
|
(rtems_unsigned32 *)key_data - Data_array );
|
||||||
if ( status )
|
if ( status )
|
||||||
printf( "status = %d\n", status );
|
printf( "status = %d\n", status );
|
||||||
|
|||||||
@@ -52,9 +52,9 @@ TEST_EXTERN rtems_unsigned8 Area_1[4096] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
TEST_EXTERN rtems_unsigned8 Area_2[274] CPU_STRUCTURE_ALIGNMENT;
|
TEST_EXTERN rtems_unsigned8 Area_2[274] CPU_STRUCTURE_ALIGNMENT;
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
#define Put_address_from_area_2( _to_be_printed ) \
|
#define Put_address_from_area_2( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -71,15 +71,15 @@ TEST_EXTERN rtems_unsigned8 Area_4[8192] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#define BASE_PRIORITY 140
|
#define BASE_PRIORITY 140
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
#define Put_address_from_area_2( _to_be_printed ) \
|
#define Put_address_from_area_2( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_2 )
|
||||||
|
|
||||||
#define Put_address_from_area_3( _to_be_printed ) \
|
#define Put_address_from_area_3( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_3 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_3 )
|
||||||
|
|
||||||
#define Put_address_from_area_4( _to_be_printed ) \
|
#define Put_address_from_area_4( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_4 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_4 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
@@ -51,6 +51,6 @@ TEST_EXTERN rtems_unsigned8 Area_1[64000] CPU_STRUCTURE_ALIGNMENT;
|
|||||||
#define BASE_PRIORITY 140
|
#define BASE_PRIORITY 140
|
||||||
|
|
||||||
#define Put_address_from_area_1( _to_be_printed ) \
|
#define Put_address_from_area_1( _to_be_printed ) \
|
||||||
printf( "0x%08x", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
printf( "0x%08lx", ((rtems_unsigned8 *)(_to_be_printed)) - Area_1 )
|
||||||
|
|
||||||
/* end of include file */
|
/* end of include file */
|
||||||
|
|||||||
Reference in New Issue
Block a user