[patch] libgloss/arm: Cast arguments to do_AngelSWI to int.
Nick Clifton
nickc@redhat.com
Sun Dec 24 01:51:00 GMT 2006
Hi Kazu,
> #ifdef ARM_RDI_MONITOR
> int block[2];
> - block[0] = path;
> + block[0] = (int)path;
> block[1] = strlen(path);
Rather than casting, lets do this the proper way and use a union. After
all this is better programming practice and avoids potential aliasing
problems. (Not that there should be in this particular case, but it
never hurts to do the right thing). ie:
union foo {
int i;
void * p;
} block [2];
block[0].p = path;
block[1].i = strlen (path);
Cheers
Nick
More information about the Newlib
mailing list