[PATCH/committed] libgloss: bfin: fix various warnings
Mike Frysinger <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
No functional changes here, just fix warnings the compiler noticed.
bfin/syscalls.c:156:13: warning: conflicting types for built-in function ‘memset’
bfin/syscalls.c: In function ‘_unlink’:
bfin/syscalls.c:193:3: warning: passing argument 2 of ‘do_syscall’ discards qualifiers from pointer target type
bfin/syscalls.c:33:1: note: expected ‘void *’ but argument is of type ‘const char *’
bfin/syscalls.c: In function ‘_exit’:
bfin/syscalls.c:104:1: warning: ‘noreturn’ function does return
---
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 2dea8c59873d..7bd0bede189d 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 ();
}
int
@@ -153,7 +154,7 @@ _sbrk (int incr)
return (caddr_t) prev_heap_end;
}
-extern void memset (struct stat *, int, unsigned int);
+extern void *memset (void *, int, unsigned int);
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);
}
void
--
2.34.1