This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 1/3] libctf: mark various args as unused in the !HAVE_MMAP case

Tested on x86_64-pc-linux-gnu, x86_64-unknown-freebsd12.0,
sparc-sun-solaris2.11, i686-pc-cygwin, i686-w64-mingw32.

	* ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
	* ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
 libctf/ctf-archive.c | 2 +-
 libctf/ctf-subr.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c
index 24144937a7..5c1692219e 100644
--- a/libctf/ctf-archive.c
+++ b/libctf/ctf-archive.c
@@ -681,7 +681,7 @@ static int arc_mmap_unmap (void *header, size_t headersz, const char **errmsg)
 /* Map the header in.  Only used on new, empty files.  */
-static void *arc_mmap_header (int fd, size_t headersz)
+static void *arc_mmap_header (int fd _libctf_unused_, size_t headersz)
   void *hdr;
   if ((hdr = malloc (headersz)) == NULL)
diff --git a/libctf/ctf-subr.c b/libctf/ctf-subr.c
index 09ec2951e5..b897351b82 100644
--- a/libctf/ctf-subr.c
+++ b/libctf/ctf-subr.c
@@ -106,7 +106,7 @@ ctf_munmap (void *buf, size_t length _libctf_unused_)
-ctf_data_protect (void *buf, size_t size)
+ctf_data_protect (void *buf _libctf_unused_, size_t size _libctf_unused_)
 #ifdef HAVE_MMAP
   /* Must be the same as the check in ctf_data_alloc().  */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]