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

via libc-commits libc-commits at lists.llvm.org
Mon Oct 2 10:41:34 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:

Ah, I misread the standard. It says that `wint_t` can be signed, but doesn't have to be. I'd still prefer to leave the extra condition in since `wint_t` could be signed.

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


More information about the libc-commits mailing list