[libc-commits] [libc] 222d7cf - [libc][NFC] Fix warning in uint operator T
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Fri Aug 11 14:35:46 PDT 2023
Author: Michael Jones
Date: 2023-08-11T14:35:41-07:00
New Revision: 222d7cf17f4db0d53eec006ebe5e7ff2562a0ee3
URL: https://github.com/llvm/llvm-project/commit/222d7cf17f4db0d53eec006ebe5e7ff2562a0ee3
DIFF: https://github.com/llvm/llvm-project/commit/222d7cf17f4db0d53eec006ebe5e7ff2562a0ee3.diff
LOG: [libc][NFC] Fix warning in uint operator T
This code is creating a warning on Fuchsia, this patch should fix that
warning.
Reviewed By: mcgrathr
Differential Revision: https://reviews.llvm.org/D157546
Added:
Modified:
libc/src/__support/UInt.h
Removed:
################################################################################
diff --git a/libc/src/__support/UInt.h b/libc/src/__support/UInt.h
index ffb3a12e2a8d34..507b8587006f6f 100644
--- a/libc/src/__support/UInt.h
+++ b/libc/src/__support/UInt.h
@@ -116,7 +116,7 @@ template <size_t Bits, bool Signed> struct BigInt {
return lo;
}
} else {
- return (static_cast<T>(val[1]) << 64) + lo;
+ return static_cast<T>((static_cast<T>(val[1]) << 64) + lo);
}
}
More information about the libc-commits
mailing list