BIND 10 master, updated. 7234eee9cf529a98841ca502dde655bd15f4299f [master] Explicitly check return status from a call to system()
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Jan 7 11:08:56 UTC 2013
The branch, master has been updated
via 7234eee9cf529a98841ca502dde655bd15f4299f (commit)
from be570bcaf88318286027da7da40a600cbe4223e9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7234eee9cf529a98841ca502dde655bd15f4299f
Author: Stephen Morris <stephen at isc.org>
Date: Mon Jan 7 11:06:09 2013 +0000
[master] Explicitly check return status from a call to system()
Using g++, on some systems a call to system() is tagged with the
"warn unused result" attribute. As all warnings are promoted to
errors, all uses of system() must use the returned status code.
-----------------------------------------------------------------------
Summary of changes:
src/bin/auth/tests/query_unittest.cc | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/auth/tests/query_unittest.cc b/src/bin/auth/tests/query_unittest.cc
index 086b251..a22d2d7 100644
--- a/src/bin/auth/tests/query_unittest.cc
+++ b/src/bin/auth/tests/query_unittest.cc
@@ -799,11 +799,13 @@ createDataSrcClientList(DataSrcType type, DataSourceClient& client) {
return (list);
case SQLITE3:
// The copy should succeed; if it failed we should notice it in
- // test cases.
- std::system(INSTALL_PROG " -c " TEST_OWN_DATA_BUILDDIR
- "/example-base.sqlite3 "
- TEST_OWN_DATA_BUILDDIR
- "/example-base.sqlite3.copied");
+ // test cases. However, we check the return value to avoid problems
+ // in some glibcs where "system()" is annotated with the "warn unused
+ // result" attribute.
+ EXPECT_EQ(0, std::system(INSTALL_PROG " -c " TEST_OWN_DATA_BUILDDIR
+ "/example-base.sqlite3 "
+ TEST_OWN_DATA_BUILDDIR
+ "/example-base.sqlite3.copied"));
list.reset(new ConfigurableClientList(RRClass::IN()));
list->configure(isc::data::Element::fromJSON(
"[{\"type\": \"sqlite3\","
More information about the bind10-changes
mailing list