[warnings] fix sign comparison issues
This commit is contained in:
parent
9e18bd94f9
commit
28037f100c
@ -62,7 +62,7 @@ static INLINE pstatus_t avx2_image_copy_bgr24_bgrx32(BYTE* WINPR_RESTRICT pDstDa
|
||||
const SSIZE_T width = nWidth - rem;
|
||||
|
||||
const size_t align = nSrcStep % 32;
|
||||
const BOOL fast = (align == 0) ? TRUE : (align >= 8 - MIN(8, rem) ? TRUE : FALSE);
|
||||
const BOOL fast = (align == 0) ? TRUE : (align >= 8 - MIN(8, (size_t)rem) ? TRUE : FALSE);
|
||||
for (SSIZE_T y = 0; y < nHeight; y++)
|
||||
{
|
||||
const BYTE* WINPR_RESTRICT srcLine =
|
||||
|
@ -57,7 +57,7 @@ static INLINE pstatus_t sse_image_copy_bgr24_bgrx32(BYTE* WINPR_RESTRICT pDstDat
|
||||
const SSIZE_T rem = nWidth % 4;
|
||||
|
||||
const size_t align = nSrcStep % 64;
|
||||
const BOOL fast = (align == 0) ? TRUE : (align >= 16 - MIN(16, rem) ? TRUE : FALSE);
|
||||
const BOOL fast = (align == 0) ? TRUE : (align >= 16 - MIN(16, (size_t)rem) ? TRUE : FALSE);
|
||||
const SSIZE_T width = nWidth - rem;
|
||||
for (SSIZE_T y = 0; y < nHeight; y++)
|
||||
{
|
||||
|
@ -602,8 +602,8 @@ static void* clipboard_synthesize_text_html(wClipboard* clipboard, UINT32 format
|
||||
|
||||
const long end = strtol(&endStr[8], NULL, 10);
|
||||
|
||||
if (beg < 0 || end < 0 || (beg > SrcSize) || (end > SrcSize) || (beg >= end) ||
|
||||
(errno != 0))
|
||||
if (beg < 0 || end < 0 || ((size_t)beg > SrcSize) || ((size_t)end > SrcSize) ||
|
||||
(beg >= end) || (errno != 0))
|
||||
return NULL;
|
||||
|
||||
const size_t DstSize = (size_t)(end - beg);
|
||||
|
Loading…
Reference in New Issue
Block a user