public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] srcfiles: fix unused variable BUFFER_SIZE
@ 2024-03-19 10:34 Jose Quaresma
  2024-03-19 11:07 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: Jose Quaresma @ 2024-03-19 10:34 UTC (permalink / raw)
  To: elfutils-devel; +Cc: Jose Quaresma

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] srcfiles: fix unused variable BUFFER_SIZE
  2024-03-19 10:34 [PATCH] srcfiles: fix unused variable BUFFER_SIZE Jose Quaresma
@ 2024-03-19 11:07 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2024-03-19 11:07 UTC (permalink / raw)
  To: Jose Quaresma; +Cc: elfutils-devel, Jose Quaresma

Hi -

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

Thanks, merged as obvious.

- FChE


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-19 11:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-19 10:34 [PATCH] srcfiles: fix unused variable BUFFER_SIZE Jose Quaresma
2024-03-19 11:07 ` Frank Ch. Eigler

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).