Browse Source

Merge #9555: [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (transaction_tests.cpp)

8455e36 [test] Avoid reading a potentially uninitialized variable in tx_invalid-test (practicalswift)

Tree-SHA512: 1064cdd5c9e4612a05397a5880535d93dbb18dec4897b4bbda9e6ad78d30f4c72303e4d23159398f1b33545ff5819e739e374d7cde757e402b26c355268a2319
pull/1/head
MarcoFalke 6 years ago
parent
commit
19be26afe3
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25
  1. 4
      src/test/transaction_tests.cpp

4
src/test/transaction_tests.cpp

@ -189,7 +189,9 @@ BOOST_AUTO_TEST_CASE(tx_invalid) @@ -189,7 +189,9 @@ BOOST_AUTO_TEST_CASE(tx_invalid)
// verifyFlags is a comma separated list of script verification flags to apply, or "NONE"
UniValue tests = read_json(std::string(json_tests::tx_invalid, json_tests::tx_invalid + sizeof(json_tests::tx_invalid)));
ScriptError err;
// Initialize to SCRIPT_ERR_OK. The tests expect err to be changed to a
// value other than SCRIPT_ERR_OK.
ScriptError err = SCRIPT_ERR_OK;
for (unsigned int idx = 0; idx < tests.size(); idx++) {
UniValue test = tests[idx];
std::string strTest = test.write();

Loading…
Cancel
Save