[ARM] Fix _unlink prototype under ARM_RDI_MONITOR.

Christophe Lyon <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <CAKdteOamD3eshDRnMwySYzXi8X_iLQLuCk+ovTD3UcBHcAYzXw@mail.gmail.com>
Hi,

I noticed that "path" is actually used when compiling with
ARM_RDI_MONITOR, so this small patch removes the unused attribute in
that case.

OK?

Christophe
newlib-2.txt (text/plain, 812 B)
commit 421cd7000646b4462df0195ba2d43a093fdd9851
Author: Christophe Lyon <[email protected]>
Date:   Mon Oct 1 16:15:35 2018 +0000

    [ARM] Fix _unlink prototype under ARM_RDI_MONITOR.
    
    2018-10-01  Christophe Lyon  <[email protected]>
    
    	* newlib/libc/sys/arm/syscalls.c (_unlink): Remove unused
    	attribute when compiling with ARM_RDI_MONITOR.

diff --git a/newlib/libc/sys/arm/syscalls.c b/newlib/libc/sys/arm/syscalls.c
index 311b28d..6d2ad79 100644
--- a/newlib/libc/sys/arm/syscalls.c
+++ b/newlib/libc/sys/arm/syscalls.c
@@ -534,7 +534,11 @@ _link (const char *__path1 __attribute__ ((unused)),
 }
 
 int
+#ifdef ARM_RDI_MONITOR
+_unlink (const char *path)
+#else
 _unlink (const char *path __attribute__ ((unused)))
+#endif
 {
 #ifdef ARM_RDI_MONITOR
   int block[2];
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.