From 72ca6added88259f9b456810bdd7300c2037b23c Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 18 Oct 2019 21:43:14 -0500 Subject: hscript: Mark more stuff as unreachable for LCOV --- hscript/key.hh | 2 ++ hscript/meta.cc | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hscript/key.hh b/hscript/key.hh index f1e2647..786df2d 100644 --- a/hscript/key.hh +++ b/hscript/key.hh @@ -39,11 +39,13 @@ public: * @returns nullptr if data is unparsable, otherwise a pointer to a Key. */ #define UNUSED __attribute__((unused)) + /* LCOV_EXCL_START */ static Key *parseFromData(const std::string &data UNUSED, int lineno UNUSED, int *errors UNUSED, int *warnings UNUSED) { return nullptr; } + /* LCOV_EXCL_STOP */ #undef UNUSED /*! Determines if the data associated with the Key is valid. */ diff --git a/hscript/meta.cc b/hscript/meta.cc index b2d7010..0248af9 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -121,7 +121,7 @@ bool Hostname::execute(ScriptOptions opts) const { if(opts.test(Simulate)) { std::cout << "printf 'dns_domain_lo=\"" << domain << "\"\\" << "n' >> /target/etc/conf.d/net" << std::endl; - } else { + } else { /* LCOV_EXCL_START */ std::ofstream net_conf_f("/target/etc/conf.d/net"); if(!net_conf_f) { output_error("installfile:" + std::to_string(this->lineno()), @@ -130,7 +130,7 @@ bool Hostname::execute(ScriptOptions opts) const { return false; } net_conf_f << "dns_domain_lo\"" << domain << "\"" << std::endl; - } + } /* LCOV_EXCL_STOP */ } return true; -- cgit v1.2.3-70-g09d2