[warnings,android] fix build warnings

This commit is contained in:
akallabeth
2025-02-22 15:16:32 +01:00
parent 9f60bb40a2
commit 12764b1ebe
4 changed files with 15 additions and 13 deletions

View File

@@ -295,10 +295,8 @@ static UINT audin_opensles_parse_addin_args(AudinOpenSLESDevice* device, const A
FREERDP_ENTRY_POINT(UINT VCAPITYPE opensles_freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinOpenSLESDevice* opensles;
UINT error;
opensles = (AudinOpenSLESDevice*)calloc(1, sizeof(AudinOpenSLESDevice));
UINT error = ERROR_INTERNAL_ERROR;
AudinOpenSLESDevice* opensles = (AudinOpenSLESDevice*)calloc(1, sizeof(AudinOpenSLESDevice));
if (!opensles)
{
@@ -313,7 +311,7 @@ FREERDP_ENTRY_POINT(UINT VCAPITYPE opensles_freerdp_audin_client_subsystem_entry
opensles->iface.Close = audin_opensles_close;
opensles->iface.Free = audin_opensles_free;
opensles->rdpcontext = pEntryPoints->rdpcontext;
args = pEntryPoints->args;
const ADDIN_ARGV* args = pEntryPoints->args;
if ((error = audin_opensles_parse_addin_args(opensles, args)))
{

View File

@@ -335,11 +335,9 @@ static int rdpsnd_opensles_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_AR
FREERDP_ENTRY_POINT(UINT VCAPITYPE opensles_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
ADDIN_ARGV* args;
rdpsndopenslesPlugin* opensles;
UINT error;
UINT error = ERROR_INTERNAL_ERROR;
DEBUG_SND("pEntryPoints=%p", (void*)pEntryPoints);
opensles = (rdpsndopenslesPlugin*)calloc(1, sizeof(rdpsndopenslesPlugin));
rdpsndopenslesPlugin* opensles = (rdpsndopenslesPlugin*)calloc(1, sizeof(rdpsndopenslesPlugin));
if (!opensles)
return CHANNEL_RC_NO_MEMORY;
@@ -352,7 +350,7 @@ FREERDP_ENTRY_POINT(UINT VCAPITYPE opensles_freerdp_rdpsnd_client_subsystem_entr
opensles->device.Play = rdpsnd_opensles_play;
opensles->device.Close = rdpsnd_opensles_close;
opensles->device.Free = rdpsnd_opensles_free;
args = pEntryPoints->args;
const ADDIN_ARGV* args = pEntryPoints->args;
rdpsnd_opensles_parse_addin_args((rdpsndDevicePlugin*)opensles, args);
if (!opensles->device_name)

View File

@@ -237,7 +237,7 @@ pstatus_t generic_image_copy_no_overlap_convert(
&pDstData[dstVMultiplier * (y + nYDst) * nDstStep + dstVOffset];
SSIZE_T x = 0;
WINPR_PRAGMA_UNROLL_LOOP
// WINPR_PRAGMA_UNROLL_LOOP
for (; x < width; x++)
{
const UINT32 color = FreeRDPReadColor_int(&srcLine[(x + nXSrc) * srcByte], SrcFormat);

View File

@@ -226,7 +226,10 @@ BOOL CommReadFile(HANDLE hDevice, LPVOID lpBuffer, DWORD nNumberOfBytesToRead,
* there is no eventfd_read() but this not the case. */
/* discard a possible and no more relevant event */
#if defined(WINPR_HAVE_SYS_EVENTFD_H)
eventfd_read(pComm->fd_read_event, NULL);
{
eventfd_t val = 0;
(void)eventfd_read(pComm->fd_read_event, &val);
}
#endif
biggestFd = pComm->fd_read;
@@ -400,7 +403,10 @@ BOOL CommWriteFile(HANDLE hDevice, LPCVOID lpBuffer, DWORD nNumberOfBytesToWrite
/* discard a possible and no more relevant event */
#if defined(WINPR_HAVE_SYS_EVENTFD_H)
eventfd_read(pComm->fd_write_event, NULL);
{
eventfd_t val = 0;
(void)eventfd_read(pComm->fd_write_event, &val);
}
#endif
/* ms */