From: Ben Woodard <woodard@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH] Fix declaratons of conditionally defined functions
Date: Tue, 2 Mar 2021 14:11:12 -0800 [thread overview]
Message-ID: <20210302221112.30655-1-woodard@redhat.com> (raw)
Functions relating to zip archives are declared but are never compiled
when --enable-zip-archive=no, the default.
This makes sure that they are not declared when they won't be defined
due to conditional compilation.
Signed-off-by: Ben Woodard <woodard@redhat.com>
---
include/abg-reader.h | 4 +++-
tools/abilint.cc | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/include/abg-reader.h b/include/abg-reader.h
index 70851c86..f1408912 100644
--- a/include/abg-reader.h
+++ b/include/abg-reader.h
@@ -52,7 +52,8 @@ create_native_xml_read_context(std::istream* in, environment* env);
const string&
read_context_get_path(const read_context&);
-abigail::corpus_sptr
+#ifdef WITH_ZIP_ARCHIVE
+corpus_sptr
read_corpus_from_file(const string& path);
int
@@ -61,6 +62,7 @@ read_corpus_from_file(corpus_sptr& corp,
int
read_corpus_from_file(corpus_sptr& corp);
+#endif //WITH_ZIP_ARCHIVE
corpus_sptr
read_corpus_from_native_xml(std::istream* in,
diff --git a/tools/abilint.cc b/tools/abilint.cc
index aaf500f7..fb7b0781 100644
--- a/tools/abilint.cc
+++ b/tools/abilint.cc
@@ -48,7 +48,6 @@ using abigail::corpus;
using abigail::corpus_sptr;
using abigail::xml_reader::read_translation_unit_from_file;
using abigail::xml_reader::read_translation_unit_from_istream;
-using abigail::xml_reader::read_corpus_from_file;
using abigail::xml_reader::read_corpus_from_native_xml;
using abigail::xml_reader::read_corpus_from_native_xml_file;
using abigail::xml_reader::read_corpus_group_from_input;
@@ -58,6 +57,9 @@ using abigail::xml_writer::write_context_sptr;
using abigail::xml_writer::create_write_context;
using abigail::xml_writer::write_corpus;
using abigail::xml_writer::write_corpus_to_archive;
+#ifdef WITH_ZIP_ARCHIVE
+using abigail::xml_reader::read_corpus_from_file;
+#endif
struct options
{
--
2.30.1
next reply other threads:[~2021-03-02 22:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 22:11 Ben Woodard [this message]
2021-03-08 12:34 ` Dodji Seketeli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210302221112.30655-1-woodard@redhat.com \
--to=woodard@redhat.com \
--cc=libabigail@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).