aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-02-25 13:04:12 +0000
committerfanquake <fanquake@gmail.com>2022-02-25 13:08:29 +0000
commitee8c99712561bfbe823d9cd787a421b5424a75d9 (patch)
treebb339273116474a30c8916490ef0ab05d043d6d9 /src
parent07e1464fc9b300f9aa6432a392769dc990f8f27d (diff)
parentaaaa4dbab4ec06d69645de919810ccd0da836a0e (diff)
Merge bitcoin/bitcoin#24402: refactor: Avoid implicit-integer-sign-change in bech32.cpp
aaaa4dbab4ec06d69645de919810ccd0da836a0e Avoid implicit-integer-sign-change in bech32.cpp (MarcoFalke) fae6b26758fff0dd52a9f4f37bb8325907a48589 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: ACK aaaa4dbab4ec06d69645de919810ccd0da836a0e Tree-SHA512: f06181494ea8a2890b510b0e840679635633146d27568adaa0f0216a52637068d32a880316e1608e08314e032565f67b6b980cc9143f420d5c15e51ef760e7e0
Diffstat (limited to 'src')
-rw-r--r--src/bech32.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bech32.cpp b/src/bech32.cpp
index 3cda1dfff5..dce9b2e4cc 100644
--- a/src/bech32.cpp
+++ b/src/bech32.cpp
@@ -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);