[warnings] fix mismatches between declaration and implementation

This commit is contained in:
akallabeth 2024-09-12 12:52:21 +02:00
parent 7ebefc505f
commit a1a1fc8658
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
33 changed files with 147 additions and 135 deletions

View File

@ -33,9 +33,10 @@ extern "C"
{
#endif
FREERDP_API SSIZE_T freerdp_bitmap_compress(const void* in_data, UINT32 width, UINT32 height,
wStream* s, UINT32 bpp, UINT32 byte_limit,
UINT32 start_line, wStream* temp_s, UINT32 e);
FREERDP_API SSIZE_T freerdp_bitmap_compress(const void* WINPR_RESTRICT srcData, UINT32 width,
UINT32 height, wStream* WINPR_RESTRICT s,
UINT32 bpp, UINT32 byte_limit, UINT32 start_line,
wStream* WINPR_RESTRICT temp_s, UINT32 e);
#ifdef __cplusplus
}

View File

@ -33,18 +33,21 @@ extern "C"
typedef struct S_CLEAR_CONTEXT CLEAR_CONTEXT;
FREERDP_API int clear_compress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize,
BYTE** ppDstData, UINT32* pDstSize);
FREERDP_API int clear_compress(CLEAR_CONTEXT* WINPR_RESTRICT clear,
const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize,
BYTE** WINPR_RESTRICT ppDstData,
UINT32* WINPR_RESTRICT pDstSize);
FREERDP_API INT32 clear_decompress(CLEAR_CONTEXT* clear, const BYTE* pSrcData, UINT32 SrcSize,
UINT32 nWidth, UINT32 nHeight, BYTE* pDstData,
FREERDP_API INT32 clear_decompress(CLEAR_CONTEXT* WINPR_RESTRICT clear,
const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize,
UINT32 nWidth, UINT32 nHeight, BYTE* WINPR_RESTRICT pDstData,
UINT32 DstFormat, UINT32 nDstStep, UINT32 nXDst,
UINT32 nYDst, UINT32 nDstWidth, UINT32 nDstHeight,
const gdiPalette* palette);
const gdiPalette* WINPR_RESTRICT palette);
FREERDP_API BOOL clear_context_reset(CLEAR_CONTEXT* clear);
FREERDP_API BOOL clear_context_reset(CLEAR_CONTEXT* WINPR_RESTRICT clear);
FREERDP_API void clear_context_free(CLEAR_CONTEXT* clear);
FREERDP_API void clear_context_free(CLEAR_CONTEXT* WINPR_RESTRICT clear);
WINPR_ATTR_MALLOC(clear_context_free, 1)
FREERDP_API CLEAR_CONTEXT* clear_context_new(BOOL Compressor);

View File

@ -46,7 +46,7 @@ extern "C"
FREERDP_API BOOL freerdp_dsp_decode(FREERDP_DSP_CONTEXT* WINPR_RESTRICT context,
const AUDIO_FORMAT* WINPR_RESTRICT srcFormat,
const BYTE* WINPR_RESTRICT data, size_t length,
wStream* out);
wStream* WINPR_RESTRICT out);
FREERDP_API BOOL freerdp_dsp_context_reset(FREERDP_DSP_CONTEXT* WINPR_RESTRICT context,
const AUDIO_FORMAT* WINPR_RESTRICT targetFormat,

View File

@ -55,9 +55,9 @@ extern "C"
FREERDP_API BOOL nsc_process_message(NSC_CONTEXT* WINPR_RESTRICT context, UINT16 bpp,
UINT32 width, UINT32 height, const BYTE* data,
UINT32 length, BYTE* pDstData, UINT32 DstFormat,
UINT32 nDstStride, UINT32 nXDst, UINT32 nYDst,
UINT32 nWidth, UINT32 nHeight, UINT32 flip);
UINT32 length, BYTE* WINPR_RESTRICT pDstData,
UINT32 DstFormat, UINT32 nDstStride, UINT32 nXDst,
UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 flip);
FREERDP_API BOOL nsc_compose_message(NSC_CONTEXT* WINPR_RESTRICT context,
wStream* WINPR_RESTRICT s,
const BYTE* WINPR_RESTRICT bmpdata, UINT32 width,

View File

@ -121,7 +121,8 @@ extern "C"
WINPR_ATTR_MALLOC(rfx_context_free, 1)
FREERDP_API RFX_CONTEXT* rfx_context_new(BOOL encoder);
FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* context, UINT32 width, UINT32 height);
FREERDP_API BOOL rfx_context_reset(RFX_CONTEXT* WINPR_RESTRICT context, UINT32 width,
UINT32 height);
FREERDP_API BOOL rfx_context_set_mode(RFX_CONTEXT* context, RLGR_MODE mode);
@ -132,9 +133,10 @@ extern "C"
*
* @return The RFX mode that is currently in use
*/
FREERDP_API RLGR_MODE rfx_context_get_mode(RFX_CONTEXT* context);
FREERDP_API RLGR_MODE rfx_context_get_mode(RFX_CONTEXT* WINPR_RESTRICT context);
FREERDP_API void rfx_context_set_pixel_format(RFX_CONTEXT* context, UINT32 pixel_format);
FREERDP_API void rfx_context_set_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context,
UINT32 pixel_format);
/** Getter for RFX pixel format
* @param context The RFX context to query
@ -143,9 +145,10 @@ extern "C"
*
* @return The RFX pixel format that is currently in use
*/
FREERDP_API UINT32 rfx_context_get_pixel_format(RFX_CONTEXT* context);
FREERDP_API UINT32 rfx_context_get_pixel_format(RFX_CONTEXT* WINPR_RESTRICT context);
FREERDP_API void rfx_context_set_palette(RFX_CONTEXT* context, const BYTE* palette);
FREERDP_API void rfx_context_set_palette(RFX_CONTEXT* WINPR_RESTRICT context,
const BYTE* WINPR_RESTRICT palette);
/** Getter for RFX palette
* @param context The RFX context to query
@ -154,9 +157,9 @@ extern "C"
*
* @return The RFX palette that is currently in use or \b NULL
*/
FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* context);
FREERDP_API const BYTE* rfx_context_get_palette(RFX_CONTEXT* WINPR_RESTRICT context);
FREERDP_API UINT32 rfx_context_get_frame_idx(const RFX_CONTEXT* context);
FREERDP_API UINT32 rfx_context_get_frame_idx(const RFX_CONTEXT* WINPR_RESTRICT context);
/** Write a RFX message as simple progressive message to a stream.
*

View File

@ -511,7 +511,7 @@ BOOL freerdp_image_copy_from_pointer_data(BYTE* WINPR_RESTRICT pDstData, UINT32
UINT32 nWidth, UINT32 nHeight,
const BYTE* WINPR_RESTRICT xorMask, UINT32 xorMaskLength,
const BYTE* WINPR_RESTRICT andMask, UINT32 andMaskLength,
UINT32 xorBpp, const gdiPalette* palette)
UINT32 xorBpp, const gdiPalette* WINPR_RESTRICT palette)
{
UINT32 dstBitsPerPixel = 0;
UINT32 dstBytesPerPixel = 0;
@ -1598,11 +1598,11 @@ UINT32 FreeRDPGetColor(UINT32 format, BYTE r, BYTE g, BYTE b, BYTE a)
}
}
BOOL freerdp_image_copy_no_overlap(BYTE* pDstData, DWORD DstFormat, UINT32 nDstStep, UINT32 nXDst,
UINT32 nYDst, UINT32 nWidth, UINT32 nHeight,
const BYTE* pSrcData, DWORD SrcFormat, UINT32 nSrcStep,
UINT32 nXSrc, UINT32 nYSrc, const gdiPalette* palette,
UINT32 flags)
BOOL freerdp_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DWORD DstFormat, UINT32 nDstStep,
UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight,
const BYTE* WINPR_RESTRICT pSrcData, DWORD SrcFormat,
UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
const gdiPalette* WINPR_RESTRICT palette, UINT32 flags)
{
static primitives_t* prims = NULL;
if (!prims)

View File

@ -634,9 +634,9 @@ BOOL interleaved_decompress(BITMAP_INTERLEAVED_CONTEXT* WINPR_RESTRICT interleav
}
BOOL interleaved_compress(BITMAP_INTERLEAVED_CONTEXT* WINPR_RESTRICT interleaved,
BYTE* WINPR_RESTRICT pDstData, UINT32* pDstSize, UINT32 nWidth,
UINT32 nHeight, const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcFormat,
UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
BYTE* WINPR_RESTRICT pDstData, UINT32* WINPR_RESTRICT pDstSize,
UINT32 nWidth, UINT32 nHeight, const BYTE* WINPR_RESTRICT pSrcData,
UINT32 SrcFormat, UINT32 nSrcStep, UINT32 nXSrc, UINT32 nYSrc,
const gdiPalette* WINPR_RESTRICT palette, UINT32 bpp)
{
BOOL status = 0;

View File

@ -409,7 +409,8 @@ BOOL nsc_context_set_pixel_format(NSC_CONTEXT* context, UINT32 pixel_format)
}
#endif
BOOL nsc_context_set_parameters(NSC_CONTEXT* context, NSC_PARAMETER what, UINT32 value)
BOOL nsc_context_set_parameters(NSC_CONTEXT* WINPR_RESTRICT context, NSC_PARAMETER what,
UINT32 value)
{
if (!context)
return FALSE;
@ -434,8 +435,8 @@ BOOL nsc_context_set_parameters(NSC_CONTEXT* context, NSC_PARAMETER what, UINT32
return TRUE;
}
BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp, UINT32 width, UINT32 height,
const BYTE* WINPR_RESTRICT data, UINT32 length,
BOOL nsc_process_message(NSC_CONTEXT* WINPR_RESTRICT context, UINT16 bpp, UINT32 width,
UINT32 height, const BYTE* data, UINT32 length,
BYTE* WINPR_RESTRICT pDstData, UINT32 DstFormat, UINT32 nDstStride,
UINT32 nXDst, UINT32 nYDst, UINT32 nWidth, UINT32 nHeight, UINT32 flip)
{

View File

@ -66,8 +66,9 @@ struct S_NSC_CONTEXT
/* color palette allocated by the application */
const BYTE* palette;
BOOL (*decode)(NSC_CONTEXT* context);
BOOL (*encode)(NSC_CONTEXT* context, const BYTE* BitmapData, UINT32 rowstride);
BOOL (*decode)(NSC_CONTEXT* WINPR_RESTRICT context);
BOOL(*encode)
(NSC_CONTEXT* WINPR_RESTRICT context, const BYTE* WINPR_RESTRICT BitmapData, UINT32 rowstride);
NSC_CONTEXT_PRIV* priv;
};

View File

@ -158,9 +158,9 @@ static INLINE UINT32 planar_invert_format(BITMAP_PLANAR_CONTEXT* WINPR_RESTRICT
return DstFormat;
}
static INLINE BOOL freerdp_bitmap_planar_compress_plane_rle(const BYTE* WINPR_RESTRICT plane,
static INLINE BOOL freerdp_bitmap_planar_compress_plane_rle(const BYTE* WINPR_RESTRICT inPlane,
UINT32 width, UINT32 height,
BYTE* outPlane,
BYTE* WINPR_RESTRICT outPlane,
UINT32* WINPR_RESTRICT dstSize);
static INLINE BYTE* freerdp_bitmap_planar_delta_encode_plane(const BYTE* WINPR_RESTRICT inPlane,
UINT32 width, UINT32 height,

View File

@ -2464,9 +2464,11 @@ BOOL progressive_rfx_write_message_progressive_simple(PROGRESSIVE_CONTEXT* progr
return rfx_write_message_progressive_simple(context, s, msg);
}
int progressive_compress(PROGRESSIVE_CONTEXT* progressive, const BYTE* pSrcData, UINT32 SrcSize,
UINT32 SrcFormat, UINT32 Width, UINT32 Height, UINT32 ScanLine,
const REGION16* invalidRegion, BYTE** ppDstData, UINT32* pDstSize)
int progressive_compress(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressive,
const BYTE* WINPR_RESTRICT pSrcData, UINT32 SrcSize, UINT32 SrcFormat,
UINT32 Width, UINT32 Height, UINT32 ScanLine,
const REGION16* WINPR_RESTRICT invalidRegion,
BYTE** WINPR_RESTRICT ppDstData, UINT32* WINPR_RESTRICT pDstSize)
{
BOOL rc = FALSE;
int res = -6;
@ -2587,7 +2589,7 @@ fail:
return res;
}
BOOL progressive_context_reset(PROGRESSIVE_CONTEXT* progressive)
BOOL progressive_context_reset(PROGRESSIVE_CONTEXT* WINPR_RESTRICT progressive)
{
if (!progressive)
return FALSE;

View File

@ -23,10 +23,11 @@
#include <freerdp/codec/rfx.h>
#include <freerdp/api.h>
FREERDP_LOCAL int rfx_rlgr_encode(RLGR_MODE mode, const INT16* data, UINT32 data_size, BYTE* buffer,
FREERDP_LOCAL int rfx_rlgr_encode(RLGR_MODE mode, const INT16* WINPR_RESTRICT data,
UINT32 data_size, BYTE* WINPR_RESTRICT buffer,
UINT32 buffer_size);
FREERDP_LOCAL int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* pSrcData, UINT32 SrcSize,
INT16* pDstData, UINT32 DstSize);
FREERDP_LOCAL int rfx_rlgr_decode(RLGR_MODE mode, const BYTE* WINPR_RESTRICT pSrcData,
UINT32 SrcSize, INT16* WINPR_RESTRICT pDstData, UINT32 rDstSize);
#endif /* FREERDP_LIB_CODEC_RFX_RLGR_H */

View File

@ -742,7 +742,7 @@ static pstatus_t neon_YUV420CombineToYUV444(avc444_frame_type type,
}
#endif
void primitives_init_YUV_neon(primitives_t* prims)
void primitives_init_YUV_neon(primitives_t* WINPR_RESTRICT prims)
{
#if defined(NEON_ENABLED)
generic = primitives_get_generic();

View File

@ -264,22 +264,20 @@ static const char openclProgram[] =
#include "primitives.cl"
;
static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
static BOOL primitives_init_opencl_context(primitives_opencl_context* WINPR_RESTRICT prims)
{
cl_platform_id* platform_ids = NULL;
cl_uint ndevices = 0;
cl_uint nplatforms = 0;
cl_kernel kernel = NULL;
cl_int ret = 0;
BOOL gotGPU = FALSE;
size_t programLen = 0;
ret = clGetPlatformIDs(0, NULL, &nplatforms);
cl_int ret = clGetPlatformIDs(0, NULL, &nplatforms);
if (ret != CL_SUCCESS || nplatforms < 1)
return FALSE;
platform_ids = calloc(nplatforms, sizeof(*platform_ids));
cl_platform_id* platform_ids = calloc(nplatforms, sizeof(*platform_ids));
if (!platform_ids)
return FALSE;
@ -324,9 +322,9 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
}
#if defined(CL_VERSION_2_0)
cl->commandQueue = clCreateCommandQueueWithProperties(context, device_id, NULL, &ret);
prims->commandQueue = clCreateCommandQueueWithProperties(context, device_id, NULL, &ret);
#else
cl->commandQueue = clCreateCommandQueue(context, device_id, 0, &ret);
prims->commandQueue = clCreateCommandQueue(context, device_id, 0, &ret);
#endif
if (ret != CL_SUCCESS)
{
@ -338,9 +336,9 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
WLog_INFO(TAG, "openCL: using platform=%s device=%s", platformName, deviceName);
cl->platformId = platform_ids[i];
cl->deviceId = device_id;
cl->context = context;
prims->platformId = platform_ids[i];
prims->deviceId = device_id;
prims->context = context;
gotGPU = TRUE;
}
@ -354,20 +352,20 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
programLen = strnlen(openclProgram, sizeof(openclProgram));
const char* ptr = openclProgram;
cl->program = clCreateProgramWithSource(cl->context, 1, &ptr, &programLen, &ret);
prims->program = clCreateProgramWithSource(prims->context, 1, &ptr, &programLen, &ret);
if (ret != CL_SUCCESS)
{
WLog_ERR(TAG, "openCL: unable to create program");
goto fail;
}
ret = clBuildProgram(cl->program, 1, &cl->deviceId, NULL, NULL, NULL);
ret = clBuildProgram(prims->program, 1, &prims->deviceId, NULL, NULL, NULL);
if (ret != CL_SUCCESS)
{
size_t length = 0;
char buffer[2048];
ret = clGetProgramBuildInfo(cl->program, cl->deviceId, CL_PROGRAM_BUILD_LOG, sizeof(buffer),
buffer, &length);
ret = clGetProgramBuildInfo(prims->program, prims->deviceId, CL_PROGRAM_BUILD_LOG,
sizeof(buffer), buffer, &length);
if (ret != CL_SUCCESS)
{
WLog_ERR(TAG,
@ -381,7 +379,7 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
goto fail;
}
kernel = clCreateKernel(cl->program, "yuv420_to_bgra_1b", &ret);
kernel = clCreateKernel(prims->program, "yuv420_to_bgra_1b", &ret);
if (ret != CL_SUCCESS)
{
WLog_ERR(TAG, "openCL: unable to create yuv420_to_bgra_1b kernel");
@ -389,11 +387,11 @@ static BOOL primitives_init_opencl_context(primitives_opencl_context* cl)
}
clReleaseKernel(kernel);
cl->support = TRUE;
prims->support = TRUE;
return TRUE;
fail:
cl_context_free(cl);
cl_context_free(prims);
return FALSE;
}

View File

@ -68,7 +68,7 @@ static pstatus_t general_YCoCgToRGB_8u_AC4R(const BYTE* pSrc, INT32 srcStep, BYT
}
/* ------------------------------------------------------------------------- */
void primitives_init_YCoCg(primitives_t* prims)
void primitives_init_YCoCg(primitives_t* WINPR_RESTRICT prims)
{
prims->YCoCgToRGB_8u_AC4R = general_YCoCgToRGB_8u_AC4R;
}

View File

@ -25,7 +25,7 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_YUV_ssse3(primitives_t* prims);
void primitives_init_YUV_neon(primitives_t* prims);
void primitives_init_YUV_ssse3(primitives_t* WINPR_RESTRICT prims);
void primitives_init_YUV_neon(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -70,7 +70,7 @@ static pstatus_t general_add_16s_inplace(INT16* WINPR_RESTRICT pSrcDst1,
}
/* ------------------------------------------------------------------------- */
void primitives_init_add(primitives_t* prims)
void primitives_init_add(primitives_t* WINPR_RESTRICT prims)
{
prims->add_16s = general_add_16s;
prims->add_16s_inplace = general_add_16s_inplace;

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_add_sse3(primitives_t* prims);
void primitives_init_add_sse3(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -88,7 +88,7 @@ static pstatus_t general_alphaComp_argb(const BYTE* pSrc1, UINT32 src1Step, cons
}
/* ------------------------------------------------------------------------- */
void primitives_init_alphaComp(primitives_t* prims)
void primitives_init_alphaComp(primitives_t* WINPR_RESTRICT prims)
{
prims->alphaComp_argb = general_alphaComp_argb;
}

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_alphaComp_sse3(primitives_t* prims);
void primitives_init_alphaComp_sse3(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -50,7 +50,7 @@ static pstatus_t general_orC_32u(const UINT32* pSrc, UINT32 val, UINT32* pDst, I
}
/* ------------------------------------------------------------------------- */
void primitives_init_andor(primitives_t* prims)
void primitives_init_andor(primitives_t* WINPR_RESTRICT prims)
{
/* Start with the default. */
prims->andC_32u = general_andC_32u;

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_andor_sse3(primitives_t* prims);
void primitives_init_andor_sse3(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -498,7 +498,7 @@ static pstatus_t general_RGBToRGB_16s8u_P3AC4R(
}
}
/* ------------------------------------------------------------------------- */
void primitives_init_colors(primitives_t* prims)
void primitives_init_colors(primitives_t* WINPR_RESTRICT prims)
{
prims->yCbCrToRGB_16s8u_P3AC4R = general_yCbCrToRGB_16s8u_P3AC4R;
prims->yCbCrToRGB_16s16s_P3P3 = general_yCbCrToRGB_16s16s_P3P3;
@ -507,7 +507,7 @@ void primitives_init_colors(primitives_t* prims)
}
/* ------------------------------------------------------------------------- */
void primitives_init_colors_opt(primitives_t* prims)
void primitives_init_colors_opt(primitives_t* WINPR_RESTRICT prims)
{
primitives_init_colors_sse2(prims);
primitives_init_colors_neon(prims);

View File

@ -372,7 +372,7 @@ static pstatus_t generic_image_copy_no_overlap(BYTE* WINPR_RESTRICT pDstData, DW
}
/* ------------------------------------------------------------------------- */
void primitives_init_copy(primitives_t* prims)
void primitives_init_copy(primitives_t* WINPR_RESTRICT prims)
{
/* Start with the default. */
prims->copy_8u = general_copy_8u;

View File

@ -280,30 +280,30 @@ static INLINE BYTE YUV2B(INT32 Y, INT32 U, INT32 V)
}
/* Function prototypes for all the init/deinit routines. */
FREERDP_LOCAL void primitives_init_copy(primitives_t* prims);
FREERDP_LOCAL void primitives_init_set(primitives_t* prims);
FREERDP_LOCAL void primitives_init_add(primitives_t* prims);
FREERDP_LOCAL void primitives_init_andor(primitives_t* prims);
FREERDP_LOCAL void primitives_init_shift(primitives_t* prims);
FREERDP_LOCAL void primitives_init_sign(primitives_t* prims);
FREERDP_LOCAL void primitives_init_alphaComp(primitives_t* prims);
FREERDP_LOCAL void primitives_init_colors(primitives_t* prims);
FREERDP_LOCAL void primitives_init_YCoCg(primitives_t* prims);
FREERDP_LOCAL void primitives_init_YUV(primitives_t* prims);
FREERDP_LOCAL void primitives_init_copy(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_set(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_add(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_andor(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_shift(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_sign(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_alphaComp(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_colors(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_YCoCg(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_YUV(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_copy_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_set_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_add_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_andor_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_shift_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_sign_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_alphaComp_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_colors_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_YCoCg_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_YUV_opt(primitives_t* prims);
FREERDP_LOCAL void primitives_init_copy_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_set_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_add_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_andor_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_shift_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_sign_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_alphaComp_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_colors_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_YCoCg_opt(primitives_t* WINPR_RESTRICT prims);
FREERDP_LOCAL void primitives_init_YUV_opt(primitives_t* WINPR_RESTRICT prims);
#if defined(WITH_OPENCL)
FREERDP_LOCAL BOOL primitives_init_opencl(primitives_t* prims);
FREERDP_LOCAL BOOL primitives_init_opencl(primitives_t* WINPR_RESTRICT prims);
#endif
FREERDP_LOCAL primitives_t* primitives_get_by_type(DWORD type);

View File

@ -113,7 +113,7 @@ static pstatus_t general_set_32u(UINT32 val, UINT32* pDst, UINT32 len)
}
/* ------------------------------------------------------------------------- */
void primitives_init_set(primitives_t* prims)
void primitives_init_set(primitives_t* WINPR_RESTRICT prims)
{
/* Start with the default. */
prims->set_8u = general_set_8u;

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_set_sse2(primitives_t* prims);
void primitives_init_set_sse2(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -123,7 +123,7 @@ static INLINE pstatus_t general_shiftC_16u(const UINT16* pSrc, INT32 val, UINT16
}
/* ------------------------------------------------------------------------- */
void primitives_init_shift(primitives_t* prims)
void primitives_init_shift(primitives_t* WINPR_RESTRICT prims)
{
/* Start with the default. */
prims->lShiftC_16s_inplace = general_lShiftC_16s_inplace;

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
extern void primitives_init_shift_sse3(primitives_t* prims);
extern void primitives_init_shift_sse3(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -36,7 +36,7 @@ static pstatus_t general_sign_16s(const INT16* pSrc, INT16* pDst, UINT32 len)
}
/* ------------------------------------------------------------------------- */
void primitives_init_sign(primitives_t* prims)
void primitives_init_sign(primitives_t* WINPR_RESTRICT prims)
{
/* Start with the default. */
prims->sign_16s = general_sign_16s;

View File

@ -25,6 +25,6 @@
#include <freerdp/config.h>
#include <freerdp/primitives.h>
void primitives_init_sign_ssse3(primitives_t* prims);
void primitives_init_sign_ssse3(primitives_t* WINPR_RESTRICT prims);
#endif

View File

@ -34,54 +34,56 @@ extern "C"
WINPR_API int WINPR_JSON_version(char* buffer, size_t len);
WINPR_API WINPR_JSON* WINPR_JSON_Parse(const char* value);
WINPR_API WINPR_JSON* WINPR_JSON_ParseWithLength(const char* value, size_t buffer_length);
WINPR_API WINPR_JSON* WINPR_JSON_Parse(const char* const value);
WINPR_API WINPR_JSON* WINPR_JSON_ParseWithLength(const char* const value, size_t buffer_length);
WINPR_API void WINPR_JSON_Delete(WINPR_JSON* item);
WINPR_API size_t WINPR_JSON_GetArraySize(const WINPR_JSON* array);
WINPR_API WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index);
WINPR_API size_t WINPR_JSON_GetArraySize(const WINPR_JSON* const array);
WINPR_API WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* const array, size_t index);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* object, const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* object,
const char* string);
WINPR_API BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* object, const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItem(const WINPR_JSON* const object,
const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* const object,
const char* const string);
WINPR_API BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* const object,
const char* const string);
WINPR_API const char* WINPR_JSON_GetErrorPtr(void);
WINPR_API const char* WINPR_JSON_GetStringValue(WINPR_JSON* item);
WINPR_API double WINPR_JSON_GetNumberValue(const WINPR_JSON* item);
WINPR_API double WINPR_JSON_GetNumberValue(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsFalse(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsTrue(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsBool(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsNull(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsNumber(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsString(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsArray(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsObject(const WINPR_JSON* item);
WINPR_API BOOL WINPR_JSON_IsInvalid(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsFalse(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsTrue(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsBool(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsNull(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsNumber(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsString(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsArray(const WINPR_JSON* const item);
WINPR_API BOOL WINPR_JSON_IsObject(const WINPR_JSON* const item);
WINPR_API WINPR_JSON* WINPR_JSON_CreateNull(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateTrue(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateFalse(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateBool(BOOL boolean);
WINPR_API WINPR_JSON* WINPR_JSON_CreateNumber(double num);
WINPR_API WINPR_JSON* WINPR_JSON_CreateString(const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_CreateString(const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_CreateArray(void);
WINPR_API WINPR_JSON* WINPR_JSON_CreateObject(void);
WINPR_API WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* name,
WINPR_API WINPR_JSON* WINPR_JSON_AddNullToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddTrueToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddFalseToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddBoolToObject(WINPR_JSON* object, const char* const name,
BOOL boolean);
WINPR_API WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* name,
WINPR_API WINPR_JSON* WINPR_JSON_AddNumberToObject(WINPR_JSON* object, const char* const name,
double number);
WINPR_API WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* name,
const char* string);
WINPR_API WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* name);
WINPR_API WINPR_JSON* WINPR_JSON_AddStringToObject(WINPR_JSON* object, const char* const name,
const char* const string);
WINPR_API WINPR_JSON* WINPR_JSON_AddObjectToObject(WINPR_JSON* object, const char* const name);
WINPR_API WINPR_JSON* WINPR_JSON_AddArrayToObject(WINPR_JSON* object, const char* const name);
WINPR_API BOOL WINPR_JSON_AddItemToArray(WINPR_JSON* array, WINPR_JSON* item);

View File

@ -110,7 +110,7 @@ int WINPR_JSON_version(char* buffer, size_t len)
#endif
}
WINPR_JSON* WINPR_JSON_Parse(const char* value)
WINPR_JSON* WINPR_JSON_Parse(const char* const value)
{
#if defined(WITH_JSONC)
return json_tokener_parse(value);
@ -122,7 +122,7 @@ WINPR_JSON* WINPR_JSON_Parse(const char* value)
#endif
}
WINPR_JSON* WINPR_JSON_ParseWithLength(const char* value, size_t buffer_length)
WINPR_JSON* WINPR_JSON_ParseWithLength(const char* const value, size_t buffer_length)
{
#if defined(WITH_JSONC)
WINPR_ASSERT(buffer_length <= INT_MAX);
@ -152,7 +152,7 @@ void WINPR_JSON_Delete(WINPR_JSON* item)
#endif
}
WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index)
WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* const array, size_t index)
{
#if defined(WITH_JSONC)
return json_object_array_get_idx((const json_object*)array, index);
@ -166,7 +166,7 @@ WINPR_JSON* WINPR_JSON_GetArrayItem(const WINPR_JSON* array, size_t index)
#endif
}
size_t WINPR_JSON_GetArraySize(const WINPR_JSON* array)
size_t WINPR_JSON_GetArraySize(const WINPR_JSON* const array)
{
#if defined(WITH_JSONC)
return json_object_array_length((const json_object*)array);
@ -208,7 +208,7 @@ WINPR_JSON* WINPR_JSON_GetObjectItemCaseSensitive(const WINPR_JSON* const object
#endif
}
BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* object, const char* string)
BOOL WINPR_JSON_HasObjectItem(const WINPR_JSON* const object, const char* const string)
{
#if defined(WITH_JSONC)
return json_object_object_get_ex((const json_object*)object, string, NULL);
@ -440,7 +440,7 @@ WINPR_JSON* WINPR_JSON_CreateNumber(double num)
#endif
}
WINPR_JSON* WINPR_JSON_CreateString(const char* string)
WINPR_JSON* WINPR_JSON_CreateString(const char* const string)
{
#if defined(WITH_JSONC)
return json_object_new_string(string);