diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2021-07-21 16:34:35 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2021-08-28 14:27:17 +0200 |
commit | 3816ea6bb6a85b184b907b006957223926b411c7 (patch) | |
tree | 7daf5e83abe31c505e87cc632cdf6af5d3c24f02 /lib/elf_py.c | |
parent | Merge pull request #9509 from LabNConsulting/chopps/dirlocals (diff) | |
download | frr-3816ea6bb6a85b184b907b006957223926b411c7.tar.xz frr-3816ea6bb6a85b184b907b006957223926b411c7.zip |
lib/clippy: fix forgotten conditional
This fixes some spurious warnings on *BSD, where `elffile_add_dynreloc`
isn't used since `elf_getdata_rawchunk` is not available.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/elf_py.c')
-rw-r--r-- | lib/elf_py.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/elf_py.c b/lib/elf_py.c index b47aa3d79..1c306893a 100644 --- a/lib/elf_py.c +++ b/lib/elf_py.c @@ -860,6 +860,7 @@ static PyObject *elffile_find_note(PyObject *self, PyObject *args) Py_RETURN_NONE; } +#ifdef HAVE_ELF_GETDATA_RAWCHUNK static bool elffile_virt2file(struct elffile *w, GElf_Addr virt, GElf_Addr *offs) { @@ -884,6 +885,7 @@ static bool elffile_virt2file(struct elffile *w, GElf_Addr virt, return false; } +#endif /* HAVE_ELF_GETDATA_RAWCHUNK */ static PyObject *elffile_subscript(PyObject *self, PyObject *key) { @@ -1016,6 +1018,7 @@ static PyTypeObject typeobj_elffile = { .tp_methods = methods_elffile, }; +#ifdef HAVE_ELF_GETDATA_RAWCHUNK static char *elfdata_strptr(Elf_Data *data, size_t offset) { char *p; @@ -1124,6 +1127,7 @@ static void elffile_add_dynreloc(struct elffile *w, Elf_Data *reldata, } } +#endif /* HAVE_ELF_GETDATA_RAWCHUNK */ /* primary (only, really) entry point to anything in this module */ static PyObject *elffile_load(PyTypeObject *type, PyObject *args, |