Fixed compilation warnings

This commit is contained in:
Armin Novak 2021-06-16 12:59:02 +02:00 committed by akallabeth
parent 19dd3f6703
commit 8f7b3258ef
2 changed files with 10 additions and 13 deletions

View File

@ -106,7 +106,7 @@ extern "C"
*/
static INLINE DWORD AreColorFormatsEqualNoAlpha(DWORD first, DWORD second)
{
const DWORD mask = ~(8 << 12);
const DWORD mask = (DWORD) ~(8UL << 12UL);
return (first & mask) == (second & mask);
}
@ -816,13 +816,13 @@ extern "C"
case PIXEL_FORMAT_ABGR32:
case PIXEL_FORMAT_ARGB32:
{
const UINT32 tmp = (dst[0] << 24) | (color & 0x00FFFFFF);
const UINT32 tmp = ((UINT32)dst[0] << 24ULL) | (color & 0x00FFFFFFULL);
return WriteColor(dst, format, tmp);
}
case PIXEL_FORMAT_BGRA32:
case PIXEL_FORMAT_RGBA32:
{
const UINT32 tmp = (dst[3]) | (color & 0xFFFFFF00);
const UINT32 tmp = ((UINT32)dst[3]) | (color & 0xFFFFFF00ULL);
return WriteColor(dst, format, tmp);
}
default:
@ -868,8 +868,8 @@ extern "C"
/***
*
* @param nWidth width to copy in pixels
* @param nHeight height to copy in pixels
* @param width width to copy in pixels
* @param height height to copy in pixels
* @param data source buffer, must be (nWidth + 7) / 8 bytes long
*
* @return A buffer allocated with _aligned_malloc(width * height, 16)
@ -914,7 +914,7 @@ extern "C"
* @param bitsMask icon's 1bpp image mask buffer
* @param cbBitsMask length of the image mask buffer in bytes
* @param colorTable icon's image color table
* @param cbBitsColor length of the image color table buffer in bytes
* @param cbColorTable length of the image color table buffer in bytes
* @param bpp color image data bits per pixel
*
* @return TRUE if success, FALSE otherwise

View File

@ -35,9 +35,6 @@ extern "C"
struct _REGION16_DATA;
typedef struct _REGION16_DATA REGION16_DATA;
/**
* @brief
*/
struct _REGION16
{
RECTANGLE_16 extents;
@ -88,19 +85,19 @@ extern "C"
FREERDP_API const RECTANGLE_16* region16_extents(const REGION16* region);
/** returns if the rectangle is empty
* @param rect
* @param rect the rectangle to check
* @return if the rectangle is empty
*/
FREERDP_API BOOL rectangle_is_empty(const RECTANGLE_16* rect);
/** returns if the region is empty
* @param region
* @param region the region to check
* @return if the region is empty
*/
FREERDP_API BOOL region16_is_empty(const REGION16* region);
/** clears the region, the region is resetted to a (0,0,0,0) region
* @param region
/** clears the region, the region is reset to a (0,0,0,0) region
* @param region the region to clear
*/
FREERDP_API void region16_clear(REGION16* region);