openwrt/tools/elfutils/patches/095-src-unused-variable.patch
Michael Pratt c16ed51e06 tools/elfutils: backport version 0.192 portability patches
These patches will be present in version 0.192 release.

Include them before the update
to support changes before updating
and in order to have a more organized git history.

Manually refreshed patch:
 - 110-objects-manifest.patch

Add patch:
 - 095-src-unused-variable.patch
 - 096-lib-config_h.patch
 - 097-libcpu-config_h.patch
 - 098-libdw-maintainer-clean.patch
 - 099-remove-unlocked-stdio.patch

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-07-26 14:38:08 +02:00

29 lines
1,009 B
Diff

From ef8a4b841aaf26326b8961a651dbe915d54d23e7 Mon Sep 17 00:00:00 2001
From: Jose Quaresma <quaresma.jose@gmail.com>
Date: Tue, 19 Mar 2024 10:34:33 +0000
Subject: [PATCH] srcfiles: fix unused variable BUFFER_SIZE
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(+)
--- a/src/srcfiles.cxx
+++ b/src/srcfiles.cxx
@@ -78,7 +78,9 @@ ARGP_PROGRAM_VERSION_HOOK_DEF = print_ve
/* 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[] =