From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 88550 invoked by alias); 5 Oct 2018 11:01:46 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 88489 invoked by uid 9007); 5 Oct 2018 11:01:45 -0000 Date: Fri, 05 Oct 2018 11:01:00 -0000 Message-ID: <20181005110145.88479.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Richard Earnshaw To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] [ARM] Cast string pointers to int to avoid compiler warnings. X-Act-Checkin: newlib-cygwin X-Git-Author: Christophe Lyon X-Git-Refname: refs/heads/master X-Git-Oldrev: 71e187bc074ae754d41c2e355965fbdef60458fb X-Git-Newrev: 3878d82a2b901f064e1f24b07520f2c38937c1f5 X-SW-Source: 2018-q4/txt/msg00000.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=3878d82a2b901f064e1f24b07520f2c38937c1f5 commit 3878d82a2b901f064e1f24b07520f2c38937c1f5 Author: Christophe Lyon Date: Mon Oct 1 17:22:43 2018 +0000 [ARM] Cast string pointers to int to avoid compiler warnings. 2018-10-01 Christophe Lyon * 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