Browse Source

Silence some warnings

Signed-off-by: falkTX <falktx@falktx.com>
pull/1780/head
falkTX 1 year ago
parent
commit
a35ab6504f
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 8 additions and 8 deletions
  1. +8
    -8
      source/utils/CarlaPipeUtils.cpp

+ 8
- 8
source/utils/CarlaPipeUtils.cpp View File

@@ -118,7 +118,7 @@ bool waitForAsyncObject(const HANDLE object, const HANDLE process = INVALID_HAND
} }


static inline static inline
ssize_t ReadFileWin32(const HANDLE pipeh, const HANDLE event, void* const buf, const std::size_t numBytes)
ssize_t ReadFileWin32(const HANDLE pipeh, const HANDLE event, void* const buf, const DWORD numBytes)
{ {
DWORD dw, dsize = numBytes; DWORD dw, dsize = numBytes;
DWORD available = 0; DWORD available = 0;
@@ -165,7 +165,7 @@ ssize_t ReadFileWin32(const HANDLE pipeh, const HANDLE event, void* const buf, c
} }


static inline static inline
ssize_t WriteFileWin32(const HANDLE pipeh, const HANDLE event, const void* const buf, const std::size_t numBytes)
ssize_t WriteFileWin32(const HANDLE pipeh, const HANDLE event, const void* const buf, const DWORD numBytes)
{ {
DWORD dw, dsize = numBytes; DWORD dw, dsize = numBytes;


@@ -1434,20 +1434,20 @@ bool CarlaPipeCommon::_writeMsgBuffer(const char* const msg, const std::size_t s
ssize_t ret; ssize_t ret;


try { try {
#ifdef CARLA_OS_WIN
ret = WriteFileWin32(pData->pipeSend, pData->ovSend, msg, size);
#else
#ifdef CARLA_OS_WIN
ret = WriteFileWin32(pData->pipeSend, pData->ovSend, msg, static_cast<DWORD>(size));
#else
ret = ::write(pData->pipeSend, msg, size); ret = ::write(pData->pipeSend, msg, size);
#endif
#endif
} CARLA_SAFE_EXCEPTION_RETURN("CarlaPipeCommon::writeMsgBuffer", false); } CARLA_SAFE_EXCEPTION_RETURN("CarlaPipeCommon::writeMsgBuffer", false);


#ifdef CARLA_OS_WIN
#ifdef CARLA_OS_WIN
if (ret == -2) if (ret == -2)
{ {
pData->pipeClosed = true; pData->pipeClosed = true;
return false; return false;
} }
#endif
#endif


if (ret == static_cast<ssize_t>(size)) if (ret == static_cast<ssize_t>(size))
{ {


Loading…
Cancel
Save