public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jose E.Marchesi <jemarch@sourceware.org>
To: bfd-cvs@sourceware.org, gdb-cvs@sourceware.org
Subject: [binutils-gdb] libctf: mark various args as unused in the !HAVE_MMAP case
Date: Fri, 07 Jun 2019 13:11:00 -0000	[thread overview]
Message-ID: <20190607131143.18419.qmail@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f5e73be11b24b6c4b7ecec5f762784c4bb40ec18

commit f5e73be11b24b6c4b7ecec5f762784c4bb40ec18
Author: Nick Alcock <nick.alcock@oracle.com>
Date:   Thu Jun 6 13:59:28 2019 +0100

    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.
    
    libctf/
    	* ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
    	* ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.

Diff:
---
 libctf/ChangeLog     | 5 +++++
 libctf/ctf-archive.c | 2 +-
 libctf/ctf-subr.c    | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 6b0a425..2a37e16 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-06  Nick Alcock  <nick.alcock@oracle.com>
+
+	* ctf-archive.c (arc_mmap_header): Mark fd as potentially unused.
+	* ctf-subr.c (ctf_data_protect): Mark both args as potentially unused.
+
 2019-06-05  Nick Alcock  <nick.alcock@oracle.com>
 
 	* ctf-archive.c (ctf_arc_write): Eschew %zi format specifier.
diff --git a/libctf/ctf-archive.c b/libctf/ctf-archive.c
index 2414493..5c16922 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)
 }
 #else
 /* 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 09ec295..b897351 100644
--- a/libctf/ctf-subr.c
+++ b/libctf/ctf-subr.c
@@ -106,7 +106,7 @@ ctf_munmap (void *buf, size_t length _libctf_unused_)
 }
 
 void
-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().  */


                 reply	other threads:[~2019-06-07 13:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190607131143.18419.qmail@sourceware.org \
    --to=jemarch@sourceware.org \
    --cc=bfd-cvs@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).