[warnings] make function declaration names consistent

Use the same parameter names for declaration and implementation.
This commit is contained in:
Armin Novak
2026-02-25 16:05:02 +01:00
parent 8e340f84ac
commit 0531803808
48 changed files with 440 additions and 451 deletions

View File

@@ -79,8 +79,8 @@ extern "C"
DWORD dwFlags);
WINPR_ATTR_NODISCARD
FREERDP_API FREERDP_ADDIN** freerdp_channels_list_addins(LPCSTR lpName, LPCSTR lpSubsystem,
LPCSTR lpType, DWORD dwFlags);
FREERDP_API FREERDP_ADDIN** freerdp_channels_list_addins(LPCSTR pszName, LPCSTR pszSubsystem,
LPCSTR pszType, DWORD dwFlags);
FREERDP_API void freerdp_channels_addin_list_free(FREERDP_ADDIN** ppAddins);
WINPR_ATTR_NODISCARD

View File

@@ -91,12 +91,12 @@ extern "C"
*
* \param file the file context to update
* \param data the file list
* \param count the length of the file list
* \param size the length of the file list
*
* \return \b TRUE for success, \b FALSE otherwise
*/
FREERDP_API BOOL cliprdr_file_context_update_client_data(CliprdrFileContext* file,
const char* data, size_t count);
const char* data, size_t size);
/** \brief updates the files the server announces to the client
*
* \param file the file context to update

View File

@@ -141,12 +141,12 @@ extern "C"
/** computes the intersection between a region and a rectangle
* @param dst destination region
* @param src the source region
* @param arg2 the rectangle that intersects
* @param rect the rectangle that intersects
* @return if the operation was successful (false meaning out-of-memory)
*/
WINPR_ATTR_NODISCARD
FREERDP_API BOOL region16_intersect_rect(REGION16* dst, const REGION16* src,
const RECTANGLE_16* arg2);
const RECTANGLE_16* rect);
/** release internal data associated with this region
* @param region the region to release

View File

@@ -109,9 +109,9 @@ extern "C"
WINPR_ATTR_NODISCARD
FREERDP_API BOOL rfx_compose_message(RFX_CONTEXT* WINPR_RESTRICT context,
wStream* WINPR_RESTRICT s,
const RFX_RECT* WINPR_RESTRICT rects, size_t num_rects,
const BYTE* WINPR_RESTRICT image_data, UINT32 width,
UINT32 height, UINT32 rowstride);
const RFX_RECT* WINPR_RESTRICT rects, size_t numRects,
const BYTE* WINPR_RESTRICT data, UINT32 width,
UINT32 height, UINT32 scanline);
WINPR_ATTR_MALLOC(rfx_message_free, 2)
WINPR_ATTR_NODISCARD

View File

@@ -39,9 +39,9 @@ extern "C"
WINPR_ATTR_NODISCARD
FREERDP_API BOOL yuv420_context_encode(YUV_CONTEXT* WINPR_RESTRICT context,
const BYTE* WINPR_RESTRICT rgbData, UINT32 srcStep,
UINT32 srcFormat, const UINT32 iStride[3],
BYTE* WINPR_RESTRICT yuvData[3],
const BYTE* WINPR_RESTRICT pSrcData, UINT32 nSrcStep,
UINT32 SrcFormat, const UINT32 iStride[3],
BYTE* WINPR_RESTRICT pYUVData[3],
const RECTANGLE_16* WINPR_RESTRICT regionRects,
UINT32 numRegionRects);

View File

@@ -88,7 +88,7 @@ extern "C"
*/
WINPR_ATTR_MALLOC(freerdp_client_codecs_free, 1)
WINPR_ATTR_NODISCARD
FREERDP_API rdpCodecs* freerdp_client_codecs_new(UINT32 TheadingFlags);
FREERDP_API rdpCodecs* freerdp_client_codecs_new(UINT32 ThreadingFlags);
#if !defined(WITHOUT_FREERDP_3x_DEPRECATED)
WINPR_DEPRECATED_VAR("[since 3.6.0] Use freerdp_client_codecs_free",

View File

@@ -748,13 +748,13 @@ owned by rdpRdp */
FREERDP_API UINT32 freerdp_get_last_error(const rdpContext* context);
WINPR_ATTR_NODISCARD
FREERDP_API const char* freerdp_get_last_error_name(UINT32 error);
FREERDP_API const char* freerdp_get_last_error_name(UINT32 code);
WINPR_ATTR_NODISCARD
FREERDP_API const char* freerdp_get_last_error_string(UINT32 error);
FREERDP_API const char* freerdp_get_last_error_string(UINT32 code);
WINPR_ATTR_NODISCARD
FREERDP_API const char* freerdp_get_last_error_category(UINT32 error);
FREERDP_API const char* freerdp_get_last_error_category(UINT32 code);
#define freerdp_set_last_error(context, lastError) \
freerdp_set_last_error_ex((context), (lastError), __func__, __FILE__, __LINE__)

View File

@@ -145,13 +145,14 @@ extern "C"
*
* \param log The logger to write to, must not be NULL.
* \param level The WLog level to use for the log entries.
* \param src A pointer to the settings to dump. May be NULL.
* \param settings A pointer to the settings to dump. May be NULL.
* \param other A pointer to the settings to dump. May be NULL.
*
* \return \b TRUE if not equal, \b FALSE otherwise
*/
WINPR_ATTR_NODISCARD
FREERDP_API BOOL freerdp_settings_print_diff(wLog* log, DWORD level, const rdpSettings* src,
FREERDP_API BOOL freerdp_settings_print_diff(wLog* log, DWORD level,
const rdpSettings* settings,
const rdpSettings* other);
FREERDP_API void freerdp_addin_argv_free(ADDIN_ARGV* args);
@@ -224,7 +225,7 @@ extern "C"
FREERDP_API RDPDR_DEVICE* freerdp_device_clone(const RDPDR_DEVICE* device);
WINPR_ATTR_NODISCARD
FREERDP_API BOOL freerdp_device_equal(const RDPDR_DEVICE* one, const RDPDR_DEVICE* other);
FREERDP_API BOOL freerdp_device_equal(const RDPDR_DEVICE* what, const RDPDR_DEVICE* other);
FREERDP_API void freerdp_device_collection_free(rdpSettings* settings);
@@ -271,7 +272,7 @@ extern "C"
FREERDP_API void freerdp_server_license_issuers_free(rdpSettings* settings);
WINPR_ATTR_NODISCARD
FREERDP_API BOOL freerdp_server_license_issuers_copy(rdpSettings* settings, char** addresses,
FREERDP_API BOOL freerdp_server_license_issuers_copy(rdpSettings* settings, char** issuers,
UINT32 count);
FREERDP_API void freerdp_target_net_addresses_free(rdpSettings* settings);
@@ -357,12 +358,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_bool(rdpSettings* settings, FreeRDP_Settings_Keys_Bool id,
BOOL param);
BOOL val);
/** \brief Returns a INT16 settings value
*
@@ -379,12 +380,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_int16(rdpSettings* settings,
FreeRDP_Settings_Keys_Int16 id, INT16 param);
FreeRDP_Settings_Keys_Int16 id, INT16 val);
/** \brief Returns a UINT16 settings value
*
@@ -401,12 +402,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_uint16(rdpSettings* settings,
FreeRDP_Settings_Keys_UInt16 id, UINT16 param);
FreeRDP_Settings_Keys_UInt16 id, UINT16 val);
/** \brief Returns a INT32 settings value
*
@@ -423,12 +424,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_int32(rdpSettings* settings,
FreeRDP_Settings_Keys_Int32 id, INT32 param);
FreeRDP_Settings_Keys_Int32 id, INT32 val);
/** \brief Returns a UINT32 settings value
*
@@ -445,12 +446,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_uint32(rdpSettings* settings,
FreeRDP_Settings_Keys_UInt32 id, UINT32 param);
FreeRDP_Settings_Keys_UInt32 id, UINT32 val);
/** \brief Returns a INT64 settings value
*
@@ -467,12 +468,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_int64(rdpSettings* settings,
FreeRDP_Settings_Keys_Int64 id, INT64 param);
FreeRDP_Settings_Keys_Int64 id, INT64 val);
/** \brief Returns a UINT64 settings value
*
@@ -489,12 +490,12 @@ extern "C"
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set.
* \param val The value to set.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_uint64(rdpSettings* settings,
FreeRDP_Settings_Keys_UInt64 id, UINT64 param);
FreeRDP_Settings_Keys_UInt64 id, UINT64 val);
/** \brief Returns a immutable string settings value
*
@@ -518,30 +519,30 @@ extern "C"
FREERDP_API char* freerdp_settings_get_string_writable(rdpSettings* settings,
FreeRDP_Settings_Keys_String id);
/** \brief Sets a string settings value. The \b param is copied.
/** \brief Sets a string settings value. The \b val is copied.
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set. If NULL allocates an empty string buffer of \b len size,
* otherwise a copy is created. \param len The length of \b param, 0 to remove the old entry.
* \param val The value to set. If NULL allocates an empty string buffer of \b len size,
* otherwise a copy is created. \param len The length of \b val, 0 to remove the old entry.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_string_len(rdpSettings* settings,
FreeRDP_Settings_Keys_String id,
const char* param, size_t len);
const char* val, size_t len);
/** \brief Sets a string settings value. The \b param is copied.
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to query
* \param param The value to set. If NULL removes the old entry, otherwise a copy is created.
* \param val The value to set. If NULL removes the old entry, otherwise a copy is
* created.
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_string(rdpSettings* settings,
FreeRDP_Settings_Keys_String id,
const char* param);
FreeRDP_Settings_Keys_String id, const char* val);
/** \brief appends a string to a settings value. The \b param is copied.
* If the initial value of the setting was not empty, @code <old value><separator><param>
@@ -618,17 +619,17 @@ extern "C"
FREERDP_API void* freerdp_settings_get_pointer_writable(rdpSettings* settings,
FreeRDP_Settings_Keys_Pointer id);
/** \brief Set a pointer to value \b data
/** \brief Set a pointer to value \b val
*
* \param settings A pointer to the settings to query, must not be NULL.
* \param id The key to update
* \param data The data to set (direct update, no copy created, previous value overwritten)
* \param val The data to set (direct update, no copy created, previous value overwritten)
*
* \return \b TRUE for success, \b FALSE for failure
*/
FREERDP_API BOOL freerdp_settings_set_pointer(rdpSettings* settings,
FreeRDP_Settings_Keys_Pointer id,
const void* data);
const void* val);
/** \brief Set a pointer to value \b data
*
@@ -812,8 +813,8 @@ extern "C"
FREERDP_API const char* freerdp_encryption_level_string(UINT32 EncryptionLevel);
WINPR_ATTR_NODISCARD
FREERDP_API const char* freerdp_encryption_methods_string(UINT32 EncryptionLevel, char* buffer,
size_t size);
FREERDP_API const char* freerdp_encryption_methods_string(UINT32 EncryptionMethods,
char* buffer, size_t size);
/** @brief returns a string representation of \b RNS_UD_XXBPP_SUPPORT values
* @param mask A bitmask of supported color dephts \b RNS_UD_*
@@ -873,14 +874,14 @@ extern "C"
/** @brief A function that converts a \b JSON string to a \b rdpSettings struct
*
* @param json The \b JSON string
* @param jstr The \b JSON string
* @param length The strlen of the \b JSON string
* @return An allocated \b rdpSettings struct or \b NULL in case of an error
* @since version 3.16.0
*/
WINPR_ATTR_MALLOC(freerdp_settings_free, 1)
WINPR_ATTR_NODISCARD
FREERDP_API rdpSettings* freerdp_settings_deserialize(const char* json, size_t length);
FREERDP_API rdpSettings* freerdp_settings_deserialize(const char* jstr, size_t length);
#ifdef __cplusplus
}

View File

@@ -53,7 +53,7 @@ extern "C"
* @return if the initialisation was successful
*/
WINPR_ATTR_NODISCARD
FREERDP_API BOOL ringbuffer_init(RingBuffer* rb, size_t initialSize);
FREERDP_API BOOL ringbuffer_init(RingBuffer* ringbuffer, size_t initialSize);
/**
* destroys internal data used by this ringbuffer
@@ -82,54 +82,54 @@ extern "C"
/** writes some bytes in the ringbuffer, if the data doesn't fit, the ringbuffer
* is resized automatically
*
* @param rb the ringbuffer
* @param ringbuffer the ringbuffer
* @param ptr a pointer on the data to add
* @param sz the size of the data to add
* @return if the operation was successful, it could fail in case of OOM during realloc()
*/
WINPR_ATTR_NODISCARD
FREERDP_API BOOL ringbuffer_write(RingBuffer* rb, const BYTE* ptr, size_t sz);
FREERDP_API BOOL ringbuffer_write(RingBuffer* ringbuffer, const BYTE* ptr, size_t sz);
/** ensures that we have sz bytes available at the write head, and return a pointer
* on the write head
*
* @param rb the ring buffer
* @param ringbuffer the ring buffer
* @param sz the size to ensure
* @return a pointer on the write head, or NULL in case of OOM
*/
WINPR_ATTR_NODISCARD
FREERDP_API BYTE* ringbuffer_ensure_linear_write(RingBuffer* rb, size_t sz);
FREERDP_API BYTE* ringbuffer_ensure_linear_write(RingBuffer* ringbuffer, size_t sz);
/** move ahead the write head in case some byte were written directly by using
* a pointer retrieved via ringbuffer_ensure_linear_write(). This function is
* used to commit the written bytes. The provided size should not exceed the
* size ensured by ringbuffer_ensure_linear_write()
*
* @param rb the ring buffer
* @param ringbuffer the ring buffer
* @param sz the number of bytes that have been written
* @return if the operation was successful, FALSE is sz is too big
*/
WINPR_ATTR_NODISCARD
FREERDP_API BOOL ringbuffer_commit_written_bytes(RingBuffer* rb, size_t sz);
FREERDP_API BOOL ringbuffer_commit_written_bytes(RingBuffer* ringbuffer, size_t sz);
/** peeks the buffer chunks for sz bytes and returns how many chunks are filled.
* Note that the sum of the resulting chunks may be smaller than sz.
*
* @param rb the ringbuffer
* @param ringbuffer the ringbuffer
* @param chunks an array of data chunks that will contain data / size of chunks
* @param sz the requested size
* @return the number of chunks used for reading sz bytes
*/
WINPR_ATTR_NODISCARD
FREERDP_API int ringbuffer_peek(const RingBuffer* rb, DataChunk chunks[2], size_t sz);
FREERDP_API int ringbuffer_peek(const RingBuffer* ringbuffer, DataChunk chunks[2], size_t sz);
/** move ahead the read head in case some byte were read using ringbuffer_peek()
* This function is used to commit the bytes that were effectively consumed.
*
* @param rb the ring buffer
* @param ringbuffer the ring buffer
* @param sz the number of bytes to read
*/
FREERDP_API void ringbuffer_commit_read_bytes(RingBuffer* rb, size_t sz);
FREERDP_API void ringbuffer_commit_read_bytes(RingBuffer* ringbuffer, size_t sz);
#ifdef __cplusplus
}

View File

@@ -66,7 +66,7 @@ extern "C"
FREERDP_API void* smartcard_call_get_context(scard_call_context* ctx, SCARDCONTEXT hContext);
WINPR_ATTR_NODISCARD
FREERDP_API LONG smartcard_irp_device_control_call(scard_call_context* context, wStream* out,
FREERDP_API LONG smartcard_irp_device_control_call(scard_call_context* ctx, wStream* out,
NTSTATUS* pIoStatus,
SMARTCARD_OPERATION* operation);