[winpr,comm] fix compiler warnings
This commit is contained in:
parent
ba7465abf5
commit
a085b0d228
@ -70,8 +70,6 @@ typedef struct comm_device COMM_DEVICE;
|
|||||||
static COMM_DEVICE** sCommDevices = NULL;
|
static COMM_DEVICE** sCommDevices = NULL;
|
||||||
static CRITICAL_SECTION sCommDevicesLock;
|
static CRITICAL_SECTION sCommDevicesLock;
|
||||||
|
|
||||||
static HANDLE_CREATOR sCommHandleCreator = { 0 };
|
|
||||||
|
|
||||||
static pthread_once_t sCommInitialized = PTHREAD_ONCE_INIT;
|
static pthread_once_t sCommInitialized = PTHREAD_ONCE_INIT;
|
||||||
|
|
||||||
static int CommGetFd(HANDLE handle)
|
static int CommGetFd(HANDLE handle)
|
||||||
|
@ -70,14 +70,13 @@ static const ULONG SERCX2_SYS_SUPPORTED_EV_MASK =
|
|||||||
/* use Serial.sys for basis (not SerCx.sys) */
|
/* use Serial.sys for basis (not SerCx.sys) */
|
||||||
static BOOL set_wait_mask(WINPR_COMM* pComm, const ULONG* pWaitMask)
|
static BOOL set_wait_mask(WINPR_COMM* pComm, const ULONG* pWaitMask)
|
||||||
{
|
{
|
||||||
ULONG possibleMask = 0;
|
const SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
||||||
SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
|
||||||
|
|
||||||
WINPR_ASSERT(pComm);
|
WINPR_ASSERT(pComm);
|
||||||
WINPR_ASSERT(pWaitMask);
|
WINPR_ASSERT(pWaitMask);
|
||||||
WINPR_ASSERT(pSerialSys);
|
WINPR_ASSERT(pSerialSys);
|
||||||
|
|
||||||
possibleMask = *pWaitMask & SERCX2_SYS_SUPPORTED_EV_MASK;
|
const ULONG possibleMask = *pWaitMask & SERCX2_SYS_SUPPORTED_EV_MASK;
|
||||||
|
|
||||||
if (possibleMask != *pWaitMask)
|
if (possibleMask != *pWaitMask)
|
||||||
{
|
{
|
||||||
@ -97,7 +96,7 @@ static BOOL set_wait_mask(WINPR_COMM* pComm, const ULONG* pWaitMask)
|
|||||||
|
|
||||||
static BOOL purge(WINPR_COMM* pComm, const ULONG* pPurgeMask)
|
static BOOL purge(WINPR_COMM* pComm, const ULONG* pPurgeMask)
|
||||||
{
|
{
|
||||||
SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
const SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
||||||
|
|
||||||
WINPR_ASSERT(pComm);
|
WINPR_ASSERT(pComm);
|
||||||
WINPR_ASSERT(pPurgeMask);
|
WINPR_ASSERT(pPurgeMask);
|
||||||
|
@ -32,7 +32,7 @@ static BOOL set_handflow(WINPR_COMM* pComm, const SERIAL_HANDFLOW* pHandflow)
|
|||||||
{
|
{
|
||||||
SERIAL_HANDFLOW SerCxHandflow;
|
SERIAL_HANDFLOW SerCxHandflow;
|
||||||
BOOL result = TRUE;
|
BOOL result = TRUE;
|
||||||
SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
const SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
||||||
|
|
||||||
memcpy(&SerCxHandflow, pHandflow, sizeof(SERIAL_HANDFLOW));
|
memcpy(&SerCxHandflow, pHandflow, sizeof(SERIAL_HANDFLOW));
|
||||||
|
|
||||||
@ -121,10 +121,9 @@ static BOOL set_handflow(WINPR_COMM* pComm, const SERIAL_HANDFLOW* pHandflow)
|
|||||||
|
|
||||||
static BOOL get_handflow(WINPR_COMM* pComm, SERIAL_HANDFLOW* pHandflow)
|
static BOOL get_handflow(WINPR_COMM* pComm, SERIAL_HANDFLOW* pHandflow)
|
||||||
{
|
{
|
||||||
BOOL result = 0;
|
const SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
||||||
SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
|
||||||
|
|
||||||
result = pSerialSys->get_handflow(pComm, pHandflow);
|
BOOL result = pSerialSys->get_handflow(pComm, pHandflow);
|
||||||
|
|
||||||
/* filter out unsupported bits by SerCx.sys
|
/* filter out unsupported bits by SerCx.sys
|
||||||
*
|
*
|
||||||
@ -153,10 +152,10 @@ static const ULONG SERCX_SYS_SUPPORTED_EV_MASK = SERIAL_EV_RXCHAR |
|
|||||||
|
|
||||||
static BOOL set_wait_mask(WINPR_COMM* pComm, const ULONG* pWaitMask)
|
static BOOL set_wait_mask(WINPR_COMM* pComm, const ULONG* pWaitMask)
|
||||||
{
|
{
|
||||||
ULONG possibleMask = 0;
|
const SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
||||||
SERIAL_DRIVER* pSerialSys = SerialSys_s();
|
WINPR_ASSERT(pWaitMask);
|
||||||
|
|
||||||
possibleMask = *pWaitMask & SERCX_SYS_SUPPORTED_EV_MASK;
|
const ULONG possibleMask = *pWaitMask & SERCX_SYS_SUPPORTED_EV_MASK;
|
||||||
|
|
||||||
if (possibleMask != *pWaitMask)
|
if (possibleMask != *pWaitMask)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user