From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1521) id E24D63858D37; Sat, 12 Feb 2022 06:35:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E24D63858D37 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Frysinger To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] libgloss: bfin: fix various warnings X-Act-Checkin: newlib-cygwin X-Git-Author: Mike Frysinger X-Git-Refname: refs/heads/master X-Git-Oldrev: 395ce0f4c072feb23e6747b4852eca16b2cc87be X-Git-Newrev: d4fa7379b0de6088b8c6ec68e3260a96d60a89f7 Message-Id: <20220212063537.E24D63858D37@sourceware.org> Date: Sat, 12 Feb 2022 06:35:37 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Feb 2022 06:35:38 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3Dd4fa7379b0d= e6088b8c6ec68e3260a96d60a89f7 commit d4fa7379b0de6088b8c6ec68e3260a96d60a89f7 Author: Mike Frysinger Date: Sat Feb 12 01:34:21 2022 -0500 libgloss: bfin: fix various warnings =20 No functional changes here, just fix warnings the compiler noticed. =20 bfin/syscalls.c:156:13: warning: conflicting types for built-in functio= n =E2=80=98memset=E2=80=99 =20 bfin/syscalls.c: In function =E2=80=98_unlink=E2=80=99: bfin/syscalls.c:193:3: warning: passing argument 2 of =E2=80=98do_sysca= ll=E2=80=99 discards qualifiers from pointer target type bfin/syscalls.c:33:1: note: expected =E2=80=98void *=E2=80=99 but argum= ent is of type =E2=80=98const char *=E2=80=99 =20 bfin/syscalls.c: In function =E2=80=98_exit=E2=80=99: bfin/syscalls.c:104:1: warning: =E2=80=98noreturn=E2=80=99 function doe= s return Diff: --- libgloss/bfin/syscalls.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libgloss/bfin/syscalls.c b/libgloss/bfin/syscalls.c index 2dea8c598..7bd0bede1 100644 --- a/libgloss/bfin/syscalls.c +++ b/libgloss/bfin/syscalls.c @@ -101,6 +101,7 @@ void _exit (int n) { do_syscall (SYS_exit, &n); + __builtin_unreachable (); } =20 int @@ -153,7 +154,7 @@ _sbrk (int incr) return (caddr_t) prev_heap_end; } =20 -extern void memset (struct stat *, int, unsigned int); +extern void *memset (void *, int, unsigned int); =20 int _fstat (int file, struct stat *st) @@ -190,7 +191,7 @@ _link (const char *existing, const char *new) int _unlink (const char *path) { - return do_syscall (SYS_unlink, path); + return do_syscall (SYS_unlink, (char *) path); } =20 void