mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Merge bitcoin/bitcoin#24402: refactor: Avoid implicit-integer-sign-change in bech32.cpp
aaaa4dbab4
Avoid implicit-integer-sign-change in bech32.cpp (MarcoFalke)fae6b26758
test: Remove no longer needed suppressions (MarcoFalke) Pull request description: Clarifies sign conversion and allows to remove a file-wide suppression. Also, includes an unrelated commit to remove unused suppressions. ACKs for top commit: fanquake: ACKaaaa4dbab4
Tree-SHA512: f06181494ea8a2890b510b0e840679635633146d27568adaa0f0216a52637068d32a880316e1608e08314e032565f67b6b980cc9143f420d5c15e51ef760e7e0
This commit is contained in:
commit
ee8c997125
@ -284,10 +284,11 @@ inline unsigned char LowerCase(unsigned char c)
|
||||
}
|
||||
|
||||
/** Return indices of invalid characters in a Bech32 string. */
|
||||
bool CheckCharacters(const std::string& str, std::vector<int>& errors) {
|
||||
bool CheckCharacters(const std::string& str, std::vector<int>& errors)
|
||||
{
|
||||
bool lower = false, upper = false;
|
||||
for (size_t i = 0; i < str.size(); ++i) {
|
||||
unsigned char c = str[i];
|
||||
unsigned char c{(unsigned char)(str[i])};
|
||||
if (c >= 'a' && c <= 'z') {
|
||||
if (upper) {
|
||||
errors.push_back(i);
|
||||
|
@ -51,15 +51,11 @@ unsigned-integer-overflow:crypto/
|
||||
unsigned-integer-overflow:hash.cpp
|
||||
unsigned-integer-overflow:policy/fees.cpp
|
||||
unsigned-integer-overflow:prevector.h
|
||||
unsigned-integer-overflow:pubkey.h
|
||||
unsigned-integer-overflow:script/interpreter.cpp
|
||||
unsigned-integer-overflow:txmempool.cpp
|
||||
unsigned-integer-overflow:util/strencodings.cpp
|
||||
implicit-integer-sign-change:bech32.cpp
|
||||
implicit-integer-sign-change:compat/stdin.cpp
|
||||
implicit-integer-sign-change:compressor.h
|
||||
implicit-integer-sign-change:crypto/
|
||||
implicit-integer-sign-change:key.cpp
|
||||
implicit-integer-sign-change:policy/fees.cpp
|
||||
implicit-integer-sign-change:prevector.h
|
||||
implicit-integer-sign-change:script/bitcoinconsensus.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user