]> git.ipfire.org Git - thirdparty/elfutils.git/commit
printversion: Fix unused variable
authorIlya Leoshkevich <iii@linux.ibm.com>
Mon, 13 Feb 2023 16:45:49 +0000 (17:45 +0100)
committerMark Wielaard <mark@klomp.org>
Tue, 14 Feb 2023 13:39:41 +0000 (14:39 +0100)
commit47297d8bf2f516b66b6d45934849137ab7658a99
treeb56300d1919068a34b6fac93d7d2c4b54e3c4062
parent8ececddf9de612bc556b16df234254291196a65d
printversion: Fix unused variable

clang complains:

    debuginfod.cxx:354:1: error: unused variable 'apba__' [-Werror,-Wunused-const-variable]
    ARGP_PROGRAM_BUG_ADDRESS_DEF = PACKAGE_BUGREPORT;
    ^
    ../lib/printversion.h:47:21: note: expanded from macro 'ARGP_PROGRAM_BUG_ADDRESS_DEF'
      const char *const apba__ __asm ("argp_program_bug_address")
                        ^

The default linkage for consts in C++ is internal, so declare them
extern. While at it, remove the debuginfod workaround for
argp_program_version_hook.

Co-developed-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
debuginfod/debuginfod.cxx
lib/printversion.h