microsoft/compiler: Fix tautological comparison

Clang detects that a signed character can't be >= 128. Instead,
we should just explicitly check for the 8th bit via bitmask compare.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
This commit is contained in:
Jesse Natalie 2020-12-28 10:56:17 -08:00 committed by Marge Bot
parent f0eda8fbf8
commit c11f2f5de8

View file

@ -185,7 +185,7 @@ static bool
is_char7_string(const char *str)
{
while (*str != '\0') {
if (*str++ >= 128)
if (*str++ & 0x80)
return false;
}
return true;