public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Richard Earnshaw <rearnsha@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] [ARM] Cast string pointers to int to avoid compiler warnings.
Date: Fri, 05 Oct 2018 11:01:00 -0000	[thread overview]
Message-ID: <20181005110145.88479.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3878d82a2b901f064e1f24b07520f2c38937c1f5

commit 3878d82a2b901f064e1f24b07520f2c38937c1f5
Author: Christophe Lyon <christophe.lyon@linaro.org>
Date:   Mon Oct 1 17:22:43 2018 +0000

        [ARM] Cast string pointers to int to avoid compiler warnings.
    
        2018-10-01  Christophe Lyon  <christophe.lyon@linaro.org>
    
        	* newlib/libc/sys/arm/syscalls.c (_unlink): Cast 'path' to int.
        	(_system): Cast 's' to int.
        	(_rename): Cast 'newpath' and 'oldpath' to int.

Diff:
---
 newlib/libc/sys/arm/syscalls.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
index 6e70467..d2a65cb 100644
--- a/newlib/libc/sys/arm/syscalls.c
+++ b/newlib/libc/sys/arm/syscalls.c
@@ -534,7 +534,7 @@ _unlink (const char *path __attribute__ ((unused)))
 {
 #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
@@ -627,7 +627,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))
@@ -654,9 +654,9 @@ _rename (const char * oldpath, const char * newpath)
 {
 #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


                 reply	other threads:[~2018-10-05 11:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181005110145.88479.qmail@sourceware.org \
    --to=rearnsha@sourceware.org \
    --cc=newlib-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).