[libc-commits] [libc] [libc][NFC] Couple of small warning fixes (PR #67847)

via libc-commits libc-commits at lists.llvm.org
Fri Sep 29 14:24:02 PDT 2023


================
@@ -28,7 +28,7 @@ namespace internal {
 LIBC_INLINE cpp::optional<int> wctob(wint_t c) {
   // This needs to be translated to EOF at the callsite. This is to avoid
   // including stdio.h in this file.
-  if (c > 127 || c < 0)
----------------
michaelrj-google wrote:

wint_t is a signed value, this "or" is important.

https://github.com/llvm/llvm-project/pull/67847


More information about the libc-commits mailing list