From 43da3358c89ca231c455fca0039f6aff85dde120 Mon Sep 17 00:00:00 2001 From: Giacomo Fiorin Date: Tue, 12 Dec 2023 17:28:11 -0500 Subject: [PATCH] Appease compiler warning --- src/colvarcomp.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/colvarcomp.cpp b/src/colvarcomp.cpp index 3cc0f43f7..2de9a03ce 100644 --- a/src/colvarcomp.cpp +++ b/src/colvarcomp.cpp @@ -174,6 +174,7 @@ cvm::atom_group *colvar::cvc::parse_group(std::string const &conf, std::string group_conf; if (key_lookup(conf, group_key, &group_conf)) { + group = new cvm::atom_group(group_key); if (b_try_scalable) { @@ -195,6 +196,8 @@ cvm::atom_group *colvar::cvc::parse_group(std::string const &conf, COLVARS_INPUT_ERROR); delete group; group = nullptr; + // Silence unused variable warning; TODO stop returning a pointer + (void) error_code; return group; } @@ -221,6 +224,9 @@ cvm::atom_group *colvar::cvc::parse_group(std::string const &conf, } } + // Silence unused variable warning; TODO stop returning a pointer + (void) error_code; + return group; }