libctf: mark various args as unused in the !HAVE_MMAP case
authorNick Alcock <nick.alcock@oracle.com>
Thu, 6 Jun 2019 12:59:28 +0000 (13:59 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Fri, 7 Jun 2019 12:46:38 +0000 (13:46 +0100)
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.

libctf/ChangeLog
libctf/ctf-archive.c
libctf/ctf-subr.c

index 6b0a425353c96f680ed6b4a38f02f0f363411aca..2a37e16cbada8c93f9f7f5151764509092ef98ba 100644 (file)
@@ -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.
index 24144937a707a3b07c7128d80352c4db2b91cc0c..5c1692219e892f2f32cd54ce5878f8e26bedf884 100644 (file)
@@ -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)
index 09ec2951e5419d7ced577571a5107e6f6302542c..b897351b82330f817356229e8c08bc88df55ed9a 100644 (file)
@@ -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().  */
This page took 0.025889 seconds and 4 git commands to generate.