[CONSRV] wcwidth.c: Fix out-of-range comparisons Clang warnings for wchar_t's, that...
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 21 Apr 2021 17:12:43 +0000 (19:12 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Wed, 5 May 2021 15:24:13 +0000 (17:24 +0200)
commitf9aca9f7d22519cc4eb81f66748b3691c4f40bf9
tree830bc144792d7bd9907be8ed8d7719732e244a8f
parentdb089c517edb75d560760ec1ff8dac35cd0a2137
[CONSRV] wcwidth.c: Fix out-of-range comparisons Clang warnings for wchar_t's, that are only 2 bytes long on NT. (#3619)
CORE-17545

win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:30: warning: result of comparison of constant 262141 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
                         ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:203:12: warning: result of comparison of constant 196608 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x30000 && ucs <= 0x3fffd)));
       ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:30: warning: result of comparison of constant 196605 with expression of type 'wchar_t' (aka 'unsigned short') is always true [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
                         ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c:202:12: warning: result of comparison of constant 131072 with expression of type 'wchar_t' (aka 'unsigned short') is always false [-Wtautological-constant-out-of-range-compare]
      (ucs >= 0x20000 && ucs <= 0x2fffd) ||
       ~~~ ^  ~~~~~~~
win32ss/user/winsrv/consrv/frontends/wcwidth.c