Browse Source

Merge #10808: Avoid some new gcc warnings in 15

c73b8be24 Explicitly initialize prevector::_union to avoid new warning (Matt Corallo)
1016dacfa Fix signed/unsigned comparison warning introduced in c8e29d7ff0. (Matt Corallo)

Tree-SHA512: d1574b0fdc9bfddc3517c382d34418b1d8ed80c81d2f6fd19378c064af8d7704fb84ef8b740ff97f7ec7609bd6de76348921fcc227e1ce97127947a0d22c7887
0.15
Pieter Wuille 7 years ago
parent
commit
ec8a50b8d7
No known key found for this signature in database
GPG Key ID: A636E97631F767E0
  1. 2
      src/core_read.cpp
  2. 2
      src/prevector.h

2
src/core_read.cpp

@ -27,7 +27,7 @@ CScript ParseScript(const std::string& s)
if (mapOpNames.empty()) if (mapOpNames.empty())
{ {
for (int op = 0; op <= MAX_OPCODE; op++) for (unsigned int op = 0; op <= MAX_OPCODE; op++)
{ {
// Allow OP_RESERVED to get into mapOpNames // Allow OP_RESERVED to get into mapOpNames
if (op < OP_NOP && op != OP_RESERVED) if (op < OP_NOP && op != OP_RESERVED)

2
src/prevector.h

@ -220,7 +220,7 @@ public:
} }
} }
prevector() : _size(0) {} prevector() : _size(0), _union{{}} {}
explicit prevector(size_type n) : _size(0) { explicit prevector(size_type n) : _size(0) {
resize(n); resize(n);

Loading…
Cancel
Save