Skip to content

Commit

Permalink
add: gcc compiler warning on BTC v0.16.3 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
decryp2kanon committed Feb 9, 2020
1 parent e59bb1c commit f09343a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ static int ec_privkey_import_der(const secp256k1_context* ctx, unsigned char *ou
if (lenb < 1 || lenb > 2) {
return 0;
}
if (end - privkey < lenb) {
if (end - privkey < lenb) { // FIXME.SUGAR // BTC issue
return 0;
}
/* sequence length */
size_t len = privkey[lenb-1] | (lenb > 1 ? privkey[lenb-2] << 8 : 0u);
privkey += lenb;
if (end - privkey < len) {
if (end - privkey < len) { // FIXME.SUGAR // BTC issue
return 0;
}
/* sequence element 0: version number (=1) */
Expand All @@ -68,7 +68,7 @@ static int ec_privkey_import_der(const secp256k1_context* ctx, unsigned char *ou
}
size_t oslen = privkey[1];
privkey += 2;
if (oslen > 32 || end - privkey < oslen) {
if (oslen > 32 || end - privkey < oslen) { // FIXME.SUGAR // BTC issue
return 0;
}
memcpy(out32 + (32 - oslen), privkey, oslen);
Expand Down
2 changes: 1 addition & 1 deletion src/leveldb/port/port_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ bool HasAcceleratedCRC32C() {
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__)
unsigned int eax, ebx, ecx, edx;
__get_cpuid(1, &eax, &ebx, &ecx, &edx);
return (ecx & (1 << 20)) != 0;
return (ecx & (1 << 20)) != 0; // FIXME.SUGAR // BTC issue
#else
return false;
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/leveldb/util/logging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) {
const int delta = (c - '0');
static const uint64_t kMaxUint64 = ~static_cast<uint64_t>(0);
if (v > kMaxUint64/10 ||
(v == kMaxUint64/10 && delta > kMaxUint64%10)) {
(v == kMaxUint64/10 && delta > kMaxUint64%10)) { // FIXME.SUGAR // BTC issue
// Overflow
return false;
}
Expand Down

0 comments on commit f09343a

Please sign in to comment.