public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Jose Quaresma <quaresma.jose@gmail.com>
To: elfutils-devel@sourceware.org
Cc: Jose Quaresma <jose.quaresma@foundries.io>
Subject: [PATCH] srcfiles: fix unused variable BUFFER_SIZE
Date: Tue, 19 Mar 2024 10:34:33 +0000	[thread overview]
Message-ID: <20240319103433.51386-1-jose.quaresma@foundries.io> (raw)

The const variable BUFFER_SIZE is used only on the zip_files
function witch is only available with LIBARCHIVE.

| ../../elfutils-0.191/src/srcfiles.cxx:81:18: error: unused variable 'BUFFER_SIZE' [-Werror,-Wunused-const-variable]
|    81 | constexpr size_t BUFFER_SIZE = 8192;
|       |                  ^~~~~~~~~~~

Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
---
 src/srcfiles.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/srcfiles.cxx b/src/srcfiles.cxx
index 892737cc..09d50f8d 100644
--- a/src/srcfiles.cxx
+++ b/src/srcfiles.cxx
@@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version;
 /* Bug report address.  */
 ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT;
 
+#ifdef HAVE_LIBARCHIVE
 constexpr size_t BUFFER_SIZE = 8192;
+#endif
 
 /* Definitions of arguments for argp functions.  */
 static const struct argp_option options[] =
-- 
2.44.0


             reply	other threads:[~2024-03-19 10:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19 10:34 Jose Quaresma [this message]
2024-03-19 11:07 ` Frank Ch. Eigler

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=20240319103433.51386-1-jose.quaresma@foundries.io \
    --to=quaresma.jose@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    --cc=jose.quaresma@foundries.io \
    /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).