forked from Imagelibrary/rtems
bsps/powerpc/ss555/start/bspstart.c: Fix array bounds warning
GCC warned that the pointer magic was resulting in an array bounds violation. The solution is to use uintptr_t when doing abusive pointer math.
This commit is contained in:
committed by
Amar Takhar
parent
d1f34a45cc
commit
41f6f28c6d
@@ -65,7 +65,7 @@ uint32_t _CPU_Counter_frequency(void)
|
|||||||
*/
|
*/
|
||||||
void bsp_start(void)
|
void bsp_start(void)
|
||||||
{
|
{
|
||||||
char* intrStack;
|
uintptr_t intrStack;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
|
* Get CPU identification dynamically. Note that the get_ppc_cpu_type()
|
||||||
@@ -78,8 +78,8 @@ void bsp_start(void)
|
|||||||
/*
|
/*
|
||||||
* Initialize some SPRG registers related to irq handling
|
* Initialize some SPRG registers related to irq handling
|
||||||
*/
|
*/
|
||||||
intrStack = (char *)_ISR_Stack_area_end -
|
intrStack = (uintptr_t)_ISR_Stack_area_end;
|
||||||
PPC_MINIMUM_STACK_FRAME_SIZE;
|
intrStack -= PPC_MINIMUM_STACK_FRAME_SIZE;
|
||||||
_write_SPRG1((unsigned int)intrStack);
|
_write_SPRG1((unsigned int)intrStack);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user