Patrick Williams | 03514f1 | 2024-04-05 07:04:11 -0500 | [diff] [blame] | 1 | From db51a55a8e3811d19265bf12d2ff715c6cf558b4 Mon Sep 17 00:00:00 2001 |
| 2 | From: Jose Quaresma <jose.quaresma@foundries.io> |
| 3 | Date: Tue, 19 Mar 2024 10:17:59 +0000 |
| 4 | Subject: [PATCH] srcfiles: fix unused variable BUFFER_SIZE |
| 5 | |
| 6 | The const variable BUFFER_SIZE is used only on the zip_files |
| 7 | function witch is only available with LIBARCHIVE. |
| 8 | |
| 9 | | ../../elfutils-0.191/src/srcfiles.cxx:81:18: error: unused variable 'BUFFER_SIZE' [-Werror,-Wunused-const-variable] |
| 10 | | 81 | constexpr size_t BUFFER_SIZE = 8192; |
| 11 | | | ^~~~~~~~~~~ |
| 12 | |
| 13 | Upstream-Status: Backport [https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=ef8a4b841aaf26326b8961a651dbe915d54d23e7] |
| 14 | |
| 15 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> |
| 16 | --- |
| 17 | src/srcfiles.cxx | 2 ++ |
| 18 | 1 file changed, 2 insertions(+) |
| 19 | |
| 20 | diff --git a/src/srcfiles.cxx b/src/srcfiles.cxx |
| 21 | index 892737cc..09d50f8d 100644 |
| 22 | --- a/src/srcfiles.cxx |
| 23 | +++ b/src/srcfiles.cxx |
| 24 | @@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_version; |
| 25 | /* Bug report address. */ |
| 26 | ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT; |
| 27 | |
| 28 | +#ifdef HAVE_LIBARCHIVE |
| 29 | constexpr size_t BUFFER_SIZE = 8192; |
| 30 | +#endif |
| 31 | |
| 32 | /* Definitions of arguments for argp functions. */ |
| 33 | static const struct argp_option options[] = |
| 34 | -- |
| 35 | 2.44.0 |
| 36 | |