[PSDK][NDK] Use hex to define MIN/MAX constants like in native SDK

This fixes use of unary minus operator on unsigned type warning.
This commit is contained in:
Timo Kreuzer 2021-06-29 10:57:43 +02:00
parent 2289deb849
commit a3763c61dc
3 changed files with 13 additions and 13 deletions

View file

@ -470,7 +470,7 @@ KeWaitForSingleObject(IN PVOID Object,
(Thread == CurrentObject->OwnerThread))
{
/* Just unwait this guy and exit */
if (CurrentObject->Header.SignalState != (LONG)MINLONG)
if (CurrentObject->Header.SignalState != MINLONG)
{
/* It has a normal signal state. Unwait and return */
KiSatisfyMutantWait(CurrentObject, Thread);

View file

@ -108,12 +108,12 @@ Author:
//
// Limits
//
#define MINCHAR (-128)
#define MAXCHAR 127
#define MINSHORT (-32768)
#define MAXSHORT 32767
#define MINLONG (-2147483648)
#define MAXLONG 2147483647
#define MINCHAR 0x80
#define MAXCHAR 0x7f
#define MINSHORT 0x8000
#define MAXSHORT 0x7fff
#define MINLONG 0x80000000
#define MAXLONG 0x7fffffff
#define MAXUCHAR 0xff
#define MAXUSHORT 0xffff
#define MAXULONG 0xffffffff

View file

@ -735,12 +735,12 @@ extern "C++" { \
#define COMPILETIME_OR_5FLAGS(a,b,c,d,e) ((UINT)(a)|(UINT)(b)|(UINT)(c)|(UINT)(d)|(UINT)(e))
/* Type Limits */
#define MINCHAR (-128)
#define MAXCHAR 127
#define MINSHORT (-32768)
#define MAXSHORT 32767
#define MINLONG (-2147483648)
#define MAXLONG 2147483647
#define MINCHAR 0x80
#define MAXCHAR 0x7f
#define MINSHORT 0x8000
#define MAXSHORT 0x7fff
#define MINLONG 0x80000000
#define MAXLONG 0x7fffffff
$if(_NTDEF_)
#define MAXUCHAR 0xff
#define MAXUSHORT 0xffff