diff --git a/libc/src/ctype/isblank.cpp b/libc/src/ctype/isblank.cpp --- a/libc/src/ctype/isblank.cpp +++ b/libc/src/ctype/isblank.cpp @@ -15,7 +15,7 @@ // TODO: Currently restricted to default locale. // These should be extended using locale information. LLVM_LIBC_FUNCTION(int, isblank, (int c)) { - const unsigned char ch = c; + const unsigned char ch = static_cast(c); return ch == ' ' || ch == '\t'; } diff --git a/libc/src/ctype/iscntrl.cpp b/libc/src/ctype/iscntrl.cpp --- a/libc/src/ctype/iscntrl.cpp +++ b/libc/src/ctype/iscntrl.cpp @@ -15,7 +15,7 @@ // TODO: Currently restricted to default locale. // These should be extended using locale information. LLVM_LIBC_FUNCTION(int, iscntrl, (int c)) { - const unsigned char ch = c; + const unsigned char ch = static_cast(c); return ch < 0x20 || ch == 0x7f; }