Commit 7234eee9 authored by Stephen Morris's avatar Stephen Morris

[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.
parent be570bca
......@@ -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\","
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment