[unused] eliminate unused functions

This commit is contained in:
akallabeth
2025-01-31 14:20:13 +01:00
parent 8a69258f38
commit 00e61074b2
10 changed files with 8 additions and 109 deletions

View File

@@ -185,14 +185,10 @@ static PresentationContext* PresentationContext_new(VideoClientContext* video, B
UINT32 x, UINT32 y, UINT32 width, UINT32 height)
{
size_t s = 4ULL * width * height;
VideoClientContextPriv* priv = NULL;
PresentationContext* ret = NULL;
WINPR_ASSERT(video);
priv = video->priv;
WINPR_ASSERT(priv);
if (s > INT32_MAX)
return NULL;

View File

@@ -32,12 +32,6 @@
#include "tf_channels.h"
#include "tf_freerdp.h"
static UINT tf_update_surfaces(RdpgfxClientContext* context)
{
WINPR_UNUSED(context);
return CHANNEL_RC_OK;
}
void tf_OnChannelConnectedEventHandler(void* context, const ChannelConnectedEventArgs* e)
{
tfContext* tf = (tfContext*)context;

View File

@@ -202,23 +202,6 @@ static BOOL requested_format_replace(RequestedFormat** ppRequestedFormat, UINT32
return TRUE;
}
static BOOL requested_format_matches(const RequestedFormat* pRequestedFormat, UINT32 formatId,
const char* formatName)
{
if (!pRequestedFormat)
return FALSE;
if (pRequestedFormat->formatToRequest != formatId)
return FALSE;
if (formatName || pRequestedFormat->formatName)
{
if (!formatName || !pRequestedFormat->formatName)
return FALSE;
if (strcmp(formatName, pRequestedFormat->formatName) != 0)
return FALSE;
}
return TRUE;
}
static void xf_cached_data_free(void* ptr)
{
xfCachedData* cached_data = ptr;
@@ -1039,22 +1022,6 @@ static void xf_cliprdr_process_requested_data(xfClipboard* clipboard, BOOL hasDa
free(pDstData);
}
static BOOL xf_add_input_flags(xfClipboard* clipboard, long mask)
{
WINPR_ASSERT(clipboard);
xfContext* xfc = clipboard->xfc;
WINPR_ASSERT(xfc);
XWindowAttributes attr = { 0 };
XGetWindowAttributes(xfc->display, xfc->drawable, &attr);
if ((attr.all_event_masks & mask) == 0)
clipboard->event_mask = attr.all_event_masks;
XSelectInput(xfc->display, xfc->drawable, attr.all_event_masks | mask);
return TRUE;
}
static BOOL xf_restore_input_flags(xfClipboard* clipboard)
{
WINPR_ASSERT(clipboard);

View File

@@ -173,13 +173,9 @@ void xf_rail_end_local_move(xfContext* xfc, xfAppWindow* appWindow)
unsigned int mask = 0;
Window root_window = 0;
Window child_window = 0;
rdpInput* input = NULL;
WINPR_ASSERT(xfc);
input = xfc->common.context.input;
WINPR_ASSERT(input);
if ((appWindow->local_move.direction == _NET_WM_MOVERESIZE_MOVE_KEYBOARD) ||
(appWindow->local_move.direction == _NET_WM_MOVERESIZE_SIZE_KEYBOARD))
{

View File

@@ -1664,14 +1664,6 @@ static BOOL cliprdr_file_content_changed_and_update(void* ihash, size_t hsize, c
return changed;
}
static BOOL cliprdr_file_server_content_changed_and_update(CliprdrFileContext* file,
const void* data, size_t size)
{
WINPR_ASSERT(file);
return cliprdr_file_content_changed_and_update(file->server_data_hash,
sizeof(file->server_data_hash), data, size);
}
static BOOL cliprdr_file_client_content_changed_and_update(CliprdrFileContext* file,
const void* data, size_t size)
{

View File

@@ -254,20 +254,6 @@ BOOL audio_format_compatible(const AUDIO_FORMAT* with, const AUDIO_FORMAT* what)
return TRUE;
}
static BOOL audio_format_valid(const AUDIO_FORMAT* format)
{
if (!format)
return FALSE;
if (format->nChannels == 0)
return FALSE;
if (format->nSamplesPerSec == 0)
return FALSE;
return TRUE;
}
AUDIO_FORMAT* audio_format_new(void)
{
return audio_formats_new(1);

View File

@@ -435,33 +435,6 @@ autodetect_on_connect_time_auto_detect_progress_default(rdpAutoDetect* autodetec
return autodetect->state;
}
static BOOL autodetect_send_netchar_sync(rdpAutoDetect* autodetect, RDP_TRANSPORT_TYPE transport,
UINT16 sequenceNumber)
{
wStream* s = NULL;
WINPR_ASSERT(autodetect);
WINPR_ASSERT(autodetect->context);
WINPR_ASSERT(autodetect->context->rdp);
/* Send the response PDU to the server */
s = rdp_message_channel_pdu_init(autodetect->context->rdp);
if (!s)
return FALSE;
WLog_Print(autodetect->log, WLOG_TRACE,
"sending Network Characteristics Sync PDU -> bandwidth=%" PRIu32 ", rtt=%" PRIu32 "",
autodetect->netCharBandwidth, autodetect->netCharAverageRTT);
Stream_Write_UINT8(s, 0x0E); /* headerLength (1 byte) */
Stream_Write_UINT8(s, TYPE_ID_AUTODETECT_RESPONSE); /* headerTypeId (1 byte) */
Stream_Write_UINT16(s, sequenceNumber); /* sequenceNumber (2 bytes) */
Stream_Write_UINT16(s, RDP_NETCHAR_SYNC_RESPONSE_TYPE); /* responseType (1 byte) */
Stream_Write_UINT32(s, autodetect->netCharBandwidth); /* bandwidth (4 bytes) */
Stream_Write_UINT32(s, autodetect->netCharAverageRTT); /* rtt (4 bytes) */
return rdp_send_message_channel_pdu(autodetect->context->rdp, s, SEC_AUTODETECT_RSP);
}
static BOOL autodetect_recv_rtt_measure_request(rdpAutoDetect* autodetect,
RDP_TRANSPORT_TYPE transport, wStream* s,
const AUTODETECT_REQ_PDU* autodetectReqPdu)

View File

@@ -65,12 +65,13 @@ enum LicenseRequestType
ERROR_ALERT = 0xFF
};
// #define LICENSE_PKT_CS_MASK \
// (LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
//#define LICENSE_PKT_SC_MASK \
// (LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
//#define LICENSE_PKT_MASK (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
/*
#define LICENSE_PKT_CS_MASK \
(LICENSE_INFO | NEW_LICENSE_REQUEST | PLATFORM_CHALLENGE_RESPONSE | ERROR_ALERT)
#define LICENSE_PKT_SC_MASK \
(LICENSE_REQUEST | PLATFORM_CHALLENGE | NEW_LICENSE | UPGRADE_LICENSE | ERROR_ALERT)
#define LICENSE_PKT_MASK (LICENSE_PKT_CS_MASK | LICENSE_PKT_SC_MASK)
*/
#define LICENSE_PREAMBLE_LENGTH 4
/* Cryptographic Lengths */

View File

@@ -109,6 +109,7 @@ static BOOL primitives_init_optimized(primitives_t* prims)
return TRUE;
}
#if defined(HAVE_CPU_OPTIMIZED_PRIMITIVES) && defined(WITH_OPENCL)
typedef struct
{
BYTE* channels[3];
@@ -165,7 +166,6 @@ fail:
return ret;
}
#if defined(HAVE_CPU_OPTIMIZED_PRIMITIVES) && defined(WITH_OPENCL)
static BOOL primitives_YUV_benchmark_run(primitives_YUV_benchmark* bench, primitives_t* prims,
UINT64 runTime, UINT32* computations)
{

View File

@@ -41,12 +41,6 @@ static inline __m256i mm256_set_epu32(uint32_t i0, uint32_t i1, uint32_t i2, uin
(int32_t)i5, (int32_t)i6, (int32_t)i7);
}
static INLINE pstatus_t avx2_image_copy_no_overlap_convert(
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,
SSIZE_T srcVMultiplier, SSIZE_T srcVOffset, SSIZE_T dstVMultiplier, SSIZE_T dstVOffset);
static INLINE pstatus_t avx2_image_copy_bgr24_bgrx32(BYTE* WINPR_RESTRICT pDstData, UINT32 nDstStep,
UINT32 nXDst, UINT32 nYDst, UINT32 nWidth,
UINT32 nHeight,