Reactos

[UCRT] Fix multiple missing dereferences

This is a bug in MS UCRT code. MSVC allows to check a pointer to be > 0, GCC emits a warning.

+3 -3
+1 -1
sdk/lib/ucrt/locale/initctype.cpp
··· 251 251 if ( (ploci->ctype1_refcount != nullptr)&& 252 252 (InterlockedDecrement(ploci->ctype1_refcount) == 0)) 253 253 { 254 - _ASSERTE(ploci->ctype1_refcount > 0); 254 + _ASSERTE(*ploci->ctype1_refcount > 0); 255 255 } 256 256 ploci->ctype1_refcount = nullptr; 257 257 ploci->ctype1 = nullptr;
+1 -1
sdk/lib/ucrt/locale/initmon.cpp
··· 205 205 if ( (ploci->lconv_mon_refcount != nullptr) && 206 206 (InterlockedDecrement(ploci->lconv_mon_refcount) == 0)) 207 207 { 208 - _ASSERTE(ploci->lconv_mon_refcount > 0); 208 + _ASSERTE(*ploci->lconv_mon_refcount > 0); 209 209 } 210 210 if ( (ploci->lconv_intl_refcount != nullptr) && 211 211 (InterlockedDecrement(ploci->lconv_intl_refcount) == 0))
+1 -1
sdk/lib/ucrt/locale/initnum.cpp
··· 187 187 if ( (ploci->lconv_num_refcount != nullptr) && 188 188 (InterlockedDecrement(ploci->lconv_num_refcount) == 0)) 189 189 { 190 - _ASSERTE(ploci->lconv_num_refcount > 0); 190 + _ASSERTE(*ploci->lconv_num_refcount > 0); 191 191 } 192 192 if ( (ploci->lconv_intl_refcount != nullptr) && 193 193 (InterlockedDecrement(ploci->lconv_intl_refcount) == 0))