[patch] libgloss/arm: Cast arguments to do_AngelSWI to int.

Kazu Hirata kazu@codesourcery.com
Wed Dec 20 23:36:00 GMT 2006


Hi,

Attached is a patch to cast arguments to do_AngelSWI to int.

Tested by building newlib.  OK to apply?

Kazu Hirata

libgloss/
2006-12-20  Kazu Hirata  <kazu@codesourcery.com>

	* arm/syscalls.c (_unlink, _system, _rename): Cast arguments
	to do_AngelSWI to int.

Index: syscalls.c
===================================================================
RCS file: /cvs/src/src/libgloss/arm/syscalls.c,v
retrieving revision 1.11
diff -u -d -p -r1.11 syscalls.c
--- syscalls.c	13 Jun 2006 20:51:08 -0000	1.11
+++ syscalls.c	20 Dec 2006 10:34:44 -0000
@@ -569,7 +569,7 @@ _unlink (const char *path)
 {
 #ifdef ARM_RDI_MONITOR
   int block[2];
-  block[0] = path;
+  block[0] = (int)path;
   block[1] = strlen(path);
   return wrap (do_AngelSWI (AngelSWI_Reason_Remove, block)) ? -1 : 0;
 #else
@@ -665,7 +665,7 @@ _system (const char *s)
      meaning to its return value.  Try to do something reasonable....  */
   if (!s)
     return 1;  /* maybe there is a shell available? we can hope. :-P */
-  block[0] = s;
+  block[0] = (int)s;
   block[1] = strlen (s);
   e = wrap (do_AngelSWI (AngelSWI_Reason_System, block));
   if ((e >= 0) && (e < 256))
@@ -690,9 +690,9 @@ _rename (const char * oldpath, const cha
 {
 #ifdef ARM_RDI_MONITOR
   int block[4];
-  block[0] = oldpath;
+  block[0] = (int)oldpath;
   block[1] = strlen(oldpath);
-  block[2] = newpath;
+  block[2] = (int)newpath;
   block[3] = strlen(newpath);
   return wrap (do_AngelSWI (AngelSWI_Reason_Rename, block)) ? -1 : 0;
 #else



More information about the Newlib mailing list