forked from Imagelibrary/rtems
added some casts to reduce warnings reported by users with Microtec C++
compiler.
This commit is contained in:
@@ -124,7 +124,7 @@ void _MPCI_Create_server( void )
|
||||
_Thread_Start(
|
||||
_MPCI_Receive_server_tcb,
|
||||
THREAD_START_NUMERIC,
|
||||
_MPCI_Receive_server,
|
||||
(void *) _MPCI_Receive_server,
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
|
||||
@@ -121,9 +121,10 @@ void _Objects_Initialize_information(
|
||||
* Allocate local pointer table
|
||||
*/
|
||||
|
||||
information->local_table = _Workspace_Allocate_or_fatal_error(
|
||||
(maximum + 1) * sizeof(Objects_Control *)
|
||||
);
|
||||
information->local_table =
|
||||
(Objects_Control **) _Workspace_Allocate_or_fatal_error(
|
||||
(maximum + 1) * sizeof(Objects_Control *)
|
||||
);
|
||||
|
||||
/*
|
||||
* Allocate name table
|
||||
@@ -137,7 +138,8 @@ void _Objects_Initialize_information(
|
||||
|
||||
information->name_length = name_length;
|
||||
|
||||
name_area = _Workspace_Allocate_or_fatal_error( (maximum + 1) * name_length );
|
||||
name_area = (Objects_Name *)
|
||||
_Workspace_Allocate_or_fatal_error( (maximum + 1) * name_length );
|
||||
information->name_table = name_area;
|
||||
|
||||
/*
|
||||
@@ -183,9 +185,10 @@ void _Objects_Initialize_information(
|
||||
|
||||
if ( supports_global == TRUE && _System_state_Is_multiprocessing ) {
|
||||
|
||||
information->global_table = _Workspace_Allocate_or_fatal_error(
|
||||
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
information->global_table =
|
||||
(Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
||||
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
|
||||
for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
|
||||
_Chain_Initialize_empty( &information->global_table[ index ] );
|
||||
@@ -208,7 +211,7 @@ void _Objects_Clear_name(
|
||||
{
|
||||
unsigned32 index;
|
||||
unsigned32 maximum = length / OBJECTS_NAME_ALIGNMENT;
|
||||
unsigned32 *name_ptr = name;
|
||||
unsigned32 *name_ptr = (unsigned32 *) name;
|
||||
|
||||
for ( index=0 ; index < maximum ; index++ )
|
||||
*name_ptr++ = 0;
|
||||
@@ -226,8 +229,8 @@ void _Objects_Copy_name_string(
|
||||
void *destination
|
||||
)
|
||||
{
|
||||
unsigned8 *source_p = source;
|
||||
unsigned8 *destination_p = destination;
|
||||
unsigned8 *source_p = (unsigned8 *) source;
|
||||
unsigned8 *destination_p = (unsigned8 *) destination;
|
||||
|
||||
do {
|
||||
*destination_p++ = *source_p;
|
||||
@@ -247,8 +250,8 @@ void _Objects_Copy_name_raw(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned32 *source_p = source;
|
||||
unsigned32 *destination_p = destination;
|
||||
unsigned32 *source_p = (unsigned32 *) source;
|
||||
unsigned32 *destination_p = (unsigned32 *) destination;
|
||||
unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
|
||||
while ( tmp_length-- )
|
||||
@@ -268,8 +271,8 @@ boolean _Objects_Compare_name_string(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned8 *name_1_p = name_1;
|
||||
unsigned8 *name_2_p = name_2;
|
||||
unsigned8 *name_1_p = (unsigned8 *) name_1;
|
||||
unsigned8 *name_2_p = (unsigned8 *) name_2;
|
||||
unsigned32 tmp_length = length;
|
||||
|
||||
do {
|
||||
@@ -295,8 +298,8 @@ boolean _Objects_Compare_name_raw(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned32 *name_1_p = name_1;
|
||||
unsigned32 *name_2_p = name_2;
|
||||
unsigned32 *name_1_p = (unsigned32 *) name_1;
|
||||
unsigned32 *name_2_p = (unsigned32 *) name_2;
|
||||
unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
|
||||
while ( tmp_length-- )
|
||||
|
||||
@@ -74,7 +74,7 @@ void _Thread_Handler_initialization(
|
||||
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
|
||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
||||
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
|
||||
@@ -122,9 +122,9 @@ void _Thread_Create_idle( void )
|
||||
*/
|
||||
|
||||
#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
|
||||
idle = _CPU_Thread_Idle_body;
|
||||
idle = (void *) _CPU_Thread_Idle_body;
|
||||
#else
|
||||
idle = _Thread_Idle_body;
|
||||
idle = (void *) _Thread_Idle_body;
|
||||
#endif
|
||||
|
||||
if ( _CPU_Table.idle_task )
|
||||
@@ -503,7 +503,7 @@ boolean _Thread_Initialize(
|
||||
} else
|
||||
extensions_area = NULL;
|
||||
|
||||
the_thread->extensions = extensions_area;
|
||||
the_thread->extensions = (void **) extensions_area;
|
||||
|
||||
/*
|
||||
* General initialization
|
||||
@@ -540,7 +540,7 @@ boolean _Thread_Initialize(
|
||||
if ( fp_area )
|
||||
(void) _Workspace_Free( fp_area );
|
||||
|
||||
_Thread_Stack_Free( the_thread->Start.stack );
|
||||
_Thread_Stack_Free( the_thread );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -567,7 +567,7 @@ boolean _Thread_Start(
|
||||
{
|
||||
if ( _States_Is_dormant( the_thread->current_state ) ) {
|
||||
|
||||
the_thread->Start.entry_point = entry_point;
|
||||
the_thread->Start.entry_point = (Thread_Entry) entry_point;
|
||||
|
||||
the_thread->Start.prototype = the_prototype;
|
||||
the_thread->Start.pointer_argument = pointer_argument;
|
||||
@@ -1131,19 +1131,23 @@ void _Thread_Handler( void )
|
||||
|
||||
switch ( executing->Start.prototype ) {
|
||||
case THREAD_START_NUMERIC:
|
||||
(*executing->Start.entry_point)( executing->Start.numeric_argument );
|
||||
(*(Thread_Entry_numeric) executing->Start.entry_point)(
|
||||
executing->Start.numeric_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_POINTER:
|
||||
(*executing->Start.entry_point)( executing->Start.pointer_argument );
|
||||
(*(Thread_Entry_pointer) executing->Start.entry_point)(
|
||||
executing->Start.pointer_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_BOTH_POINTER_FIRST:
|
||||
(*executing->Start.entry_point)(
|
||||
(*(Thread_Entry_both_pointer_first) executing->Start.entry_point)(
|
||||
executing->Start.pointer_argument,
|
||||
executing->Start.numeric_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_BOTH_NUMERIC_FIRST:
|
||||
(*executing->Start.entry_point)(
|
||||
(*(Thread_Entry_both_numeric_first) executing->Start.entry_point)(
|
||||
executing->Start.numeric_argument,
|
||||
executing->Start.pointer_argument
|
||||
);
|
||||
|
||||
@@ -132,7 +132,7 @@ restart:
|
||||
!_Chain_Is_tail( &_Thread_MP_Active_proxies, proxy_node ) ;
|
||||
) {
|
||||
|
||||
the_thread = _Addresses_Subtract_offset(
|
||||
the_thread = (Thread_Control *) _Addresses_Subtract_offset(
|
||||
proxy_node,
|
||||
_Thread_MP_Proxy_Active_offset
|
||||
);
|
||||
|
||||
@@ -124,7 +124,7 @@ void _MPCI_Create_server( void )
|
||||
_Thread_Start(
|
||||
_MPCI_Receive_server_tcb,
|
||||
THREAD_START_NUMERIC,
|
||||
_MPCI_Receive_server,
|
||||
(void *) _MPCI_Receive_server,
|
||||
NULL,
|
||||
0
|
||||
);
|
||||
|
||||
@@ -121,9 +121,10 @@ void _Objects_Initialize_information(
|
||||
* Allocate local pointer table
|
||||
*/
|
||||
|
||||
information->local_table = _Workspace_Allocate_or_fatal_error(
|
||||
(maximum + 1) * sizeof(Objects_Control *)
|
||||
);
|
||||
information->local_table =
|
||||
(Objects_Control **) _Workspace_Allocate_or_fatal_error(
|
||||
(maximum + 1) * sizeof(Objects_Control *)
|
||||
);
|
||||
|
||||
/*
|
||||
* Allocate name table
|
||||
@@ -137,7 +138,8 @@ void _Objects_Initialize_information(
|
||||
|
||||
information->name_length = name_length;
|
||||
|
||||
name_area = _Workspace_Allocate_or_fatal_error( (maximum + 1) * name_length );
|
||||
name_area = (Objects_Name *)
|
||||
_Workspace_Allocate_or_fatal_error( (maximum + 1) * name_length );
|
||||
information->name_table = name_area;
|
||||
|
||||
/*
|
||||
@@ -183,9 +185,10 @@ void _Objects_Initialize_information(
|
||||
|
||||
if ( supports_global == TRUE && _System_state_Is_multiprocessing ) {
|
||||
|
||||
information->global_table = _Workspace_Allocate_or_fatal_error(
|
||||
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
information->global_table =
|
||||
(Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
||||
(_Objects_Maximum_nodes + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
|
||||
for ( index=1; index <= _Objects_Maximum_nodes ; index++ )
|
||||
_Chain_Initialize_empty( &information->global_table[ index ] );
|
||||
@@ -208,7 +211,7 @@ void _Objects_Clear_name(
|
||||
{
|
||||
unsigned32 index;
|
||||
unsigned32 maximum = length / OBJECTS_NAME_ALIGNMENT;
|
||||
unsigned32 *name_ptr = name;
|
||||
unsigned32 *name_ptr = (unsigned32 *) name;
|
||||
|
||||
for ( index=0 ; index < maximum ; index++ )
|
||||
*name_ptr++ = 0;
|
||||
@@ -226,8 +229,8 @@ void _Objects_Copy_name_string(
|
||||
void *destination
|
||||
)
|
||||
{
|
||||
unsigned8 *source_p = source;
|
||||
unsigned8 *destination_p = destination;
|
||||
unsigned8 *source_p = (unsigned8 *) source;
|
||||
unsigned8 *destination_p = (unsigned8 *) destination;
|
||||
|
||||
do {
|
||||
*destination_p++ = *source_p;
|
||||
@@ -247,8 +250,8 @@ void _Objects_Copy_name_raw(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned32 *source_p = source;
|
||||
unsigned32 *destination_p = destination;
|
||||
unsigned32 *source_p = (unsigned32 *) source;
|
||||
unsigned32 *destination_p = (unsigned32 *) destination;
|
||||
unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
|
||||
while ( tmp_length-- )
|
||||
@@ -268,8 +271,8 @@ boolean _Objects_Compare_name_string(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned8 *name_1_p = name_1;
|
||||
unsigned8 *name_2_p = name_2;
|
||||
unsigned8 *name_1_p = (unsigned8 *) name_1;
|
||||
unsigned8 *name_2_p = (unsigned8 *) name_2;
|
||||
unsigned32 tmp_length = length;
|
||||
|
||||
do {
|
||||
@@ -295,8 +298,8 @@ boolean _Objects_Compare_name_raw(
|
||||
unsigned32 length
|
||||
)
|
||||
{
|
||||
unsigned32 *name_1_p = name_1;
|
||||
unsigned32 *name_2_p = name_2;
|
||||
unsigned32 *name_1_p = (unsigned32 *) name_1;
|
||||
unsigned32 *name_2_p = (unsigned32 *) name_2;
|
||||
unsigned32 tmp_length = length / OBJECTS_NAME_ALIGNMENT;
|
||||
|
||||
while ( tmp_length-- )
|
||||
|
||||
@@ -74,7 +74,7 @@ void _Thread_Handler_initialization(
|
||||
|
||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||
|
||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
|
||||
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
|
||||
);
|
||||
|
||||
@@ -122,9 +122,9 @@ void _Thread_Create_idle( void )
|
||||
*/
|
||||
|
||||
#if (CPU_PROVIDES_IDLE_THREAD_BODY == TRUE)
|
||||
idle = _CPU_Thread_Idle_body;
|
||||
idle = (void *) _CPU_Thread_Idle_body;
|
||||
#else
|
||||
idle = _Thread_Idle_body;
|
||||
idle = (void *) _Thread_Idle_body;
|
||||
#endif
|
||||
|
||||
if ( _CPU_Table.idle_task )
|
||||
@@ -503,7 +503,7 @@ boolean _Thread_Initialize(
|
||||
} else
|
||||
extensions_area = NULL;
|
||||
|
||||
the_thread->extensions = extensions_area;
|
||||
the_thread->extensions = (void **) extensions_area;
|
||||
|
||||
/*
|
||||
* General initialization
|
||||
@@ -540,7 +540,7 @@ boolean _Thread_Initialize(
|
||||
if ( fp_area )
|
||||
(void) _Workspace_Free( fp_area );
|
||||
|
||||
_Thread_Stack_Free( the_thread->Start.stack );
|
||||
_Thread_Stack_Free( the_thread );
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@@ -567,7 +567,7 @@ boolean _Thread_Start(
|
||||
{
|
||||
if ( _States_Is_dormant( the_thread->current_state ) ) {
|
||||
|
||||
the_thread->Start.entry_point = entry_point;
|
||||
the_thread->Start.entry_point = (Thread_Entry) entry_point;
|
||||
|
||||
the_thread->Start.prototype = the_prototype;
|
||||
the_thread->Start.pointer_argument = pointer_argument;
|
||||
@@ -1131,19 +1131,23 @@ void _Thread_Handler( void )
|
||||
|
||||
switch ( executing->Start.prototype ) {
|
||||
case THREAD_START_NUMERIC:
|
||||
(*executing->Start.entry_point)( executing->Start.numeric_argument );
|
||||
(*(Thread_Entry_numeric) executing->Start.entry_point)(
|
||||
executing->Start.numeric_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_POINTER:
|
||||
(*executing->Start.entry_point)( executing->Start.pointer_argument );
|
||||
(*(Thread_Entry_pointer) executing->Start.entry_point)(
|
||||
executing->Start.pointer_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_BOTH_POINTER_FIRST:
|
||||
(*executing->Start.entry_point)(
|
||||
(*(Thread_Entry_both_pointer_first) executing->Start.entry_point)(
|
||||
executing->Start.pointer_argument,
|
||||
executing->Start.numeric_argument
|
||||
);
|
||||
break;
|
||||
case THREAD_START_BOTH_NUMERIC_FIRST:
|
||||
(*executing->Start.entry_point)(
|
||||
(*(Thread_Entry_both_numeric_first) executing->Start.entry_point)(
|
||||
executing->Start.numeric_argument,
|
||||
executing->Start.pointer_argument
|
||||
);
|
||||
|
||||
@@ -132,7 +132,7 @@ restart:
|
||||
!_Chain_Is_tail( &_Thread_MP_Active_proxies, proxy_node ) ;
|
||||
) {
|
||||
|
||||
the_thread = _Addresses_Subtract_offset(
|
||||
the_thread = (Thread_Control *) _Addresses_Subtract_offset(
|
||||
proxy_node,
|
||||
_Thread_MP_Proxy_Active_offset
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user