From aa4f8daf999c31025c076c031dfffb7c3de5b473 Mon Sep 17 00:00:00 2001 From: Puetz Kevin A Date: Thu, 16 Jul 2020 21:15:38 +0200 Subject: [PATCH] include: Use unsigned int in InlineIsEqualGUID. This fixes stand-alone inclusion of (without first including ). Signed-off-by: Kevin Puetz Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- include/guiddef.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/guiddef.h b/include/guiddef.h index 664f74fac30..a25b3a71077 100644 --- a/include/guiddef.h +++ b/include/guiddef.h @@ -156,18 +156,18 @@ typedef GUID FMTID,*LPFMTID; #define IsEqualGUID(rguid1, rguid2) (!memcmp(&(rguid1), &(rguid2), sizeof(GUID))) inline int InlineIsEqualGUID(REFGUID rguid1, REFGUID rguid2) { - return (((ULONG *)&rguid1)[0] == ((ULONG *)&rguid2)[0] && - ((ULONG *)&rguid1)[1] == ((ULONG *)&rguid2)[1] && - ((ULONG *)&rguid1)[2] == ((ULONG *)&rguid2)[2] && - ((ULONG *)&rguid1)[3] == ((ULONG *)&rguid2)[3]); + return (((unsigned int *)&rguid1)[0] == ((unsigned int *)&rguid2)[0] && + ((unsigned int *)&rguid1)[1] == ((unsigned int *)&rguid2)[1] && + ((unsigned int *)&rguid1)[2] == ((unsigned int *)&rguid2)[2] && + ((unsigned int *)&rguid1)[3] == ((unsigned int *)&rguid2)[3]); } #else #define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID))) #define InlineIsEqualGUID(rguid1, rguid2) \ - (((ULONG *)rguid1)[0] == ((ULONG *)rguid2)[0] && \ - ((ULONG *)rguid1)[1] == ((ULONG *)rguid2)[1] && \ - ((ULONG *)rguid1)[2] == ((ULONG *)rguid2)[2] && \ - ((ULONG *)rguid1)[3] == ((ULONG *)rguid2)[3]) + (((unsigned int *)rguid1)[0] == ((unsigned int *)rguid2)[0] && \ + ((unsigned int *)rguid1)[1] == ((unsigned int *)rguid2)[1] && \ + ((unsigned int *)rguid1)[2] == ((unsigned int *)rguid2)[2] && \ + ((unsigned int *)rguid1)[3] == ((unsigned int *)rguid2)[3]) #endif #ifdef __cplusplus