From 8f7b3258effb69db3a01d1d73c5a35a6034e3fe3 Mon Sep 17 00:00:00 2001 From: Armin Novak Date: Wed, 16 Jun 2021 12:59:02 +0200 Subject: [PATCH] Fixed compilation warnings --- include/freerdp/codec/color.h | 12 ++++++------ include/freerdp/codec/region.h | 11 ++++------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/include/freerdp/codec/color.h b/include/freerdp/codec/color.h index 42cb104d1..469f8e628 100644 --- a/include/freerdp/codec/color.h +++ b/include/freerdp/codec/color.h @@ -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 diff --git a/include/freerdp/codec/region.h b/include/freerdp/codec/region.h index ccacdb254..daac6fb44 100644 --- a/include/freerdp/codec/region.h +++ b/include/freerdp/codec/region.h @@ -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);