Reduce build warnings and enable Qt build

This commit is contained in:
root
2026-04-28 16:50:31 +00:00
parent 34864c5254
commit 43b88c7110
43 changed files with 164 additions and 87 deletions
+4 -2
View File
@@ -55,8 +55,10 @@ void InitOnce(OnceType* once, void (*initializer)()) {
bool HasAcceleratedCRC32C() {
#if (defined(__x86_64__) || defined(__i386__)) && defined(__GNUC__)
unsigned int eax, ebx, ecx, edx;
__get_cpuid(1, &eax, &ebx, &ecx, &edx);
unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0;
if (__get_cpuid(1, &eax, &ebx, &ecx, &edx) == 0) {
return false;
}
return (ecx & (1 << 20)) != 0;
#else
return false;
+1 -1
View File
@@ -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 && static_cast<uint64_t>(delta) > kMaxUint64%10)) {
// Overflow
return false;
}