CEC_PARAMETER_TYPE_UNKOWN
} libcec_parameter_type;
-struct libcec_parameter
+typedef struct libcec_parameter
{
libcec_parameter_type paramType; /**< the type of this parameter */
void* paramData; /**< the value of this parameter */
-};
+} libcec_parameter;
-struct libcec_configuration;
+typedef struct libcec_configuration libcec_configuration;
typedef int (CEC_CDECL* CBCecLogMessageType)(void *param, const cec_log_message &);
typedef int (CEC_CDECL* CBCecKeyPressType)(void *param, const cec_keypress &);
CEC_SERVER_VERSION_1_9_0 = 0x1900
} cec_server_version;
-typedef struct libcec_configuration
+struct libcec_configuration
{
uint32_t clientVersion; /*!< the version of the client that is connecting */
char strDeviceName[13]; /*!< how to name the device on the CEC bus */
callbacks = NULL;
}
#endif
-} libcec_configuration;
+};
#ifdef __cplusplus
};
tmp = (void *)strDevicePath;
#endif
- iBufSize = 0; /* silence "unused" warning on linux/osx */
+ iBufSize = 0; if(!iBufSize){} /* silence "unused" warning on linux/osx */
return iFound;
}
{
FD_ZERO(&port);
FD_SET(socket, &port);
- int returnv = select(socket + 1, NULL, &port, NULL, tv);
+ ssize_t returnv = (ssize_t)select(socket + 1, NULL, &port, NULL, tv);
if (returnv < 0)
{
*iError = errno;
FD_ZERO(&port);
FD_SET(socket, &port);
- int32_t returnv = select(socket + 1, &port, NULL, NULL, tv);
+ ssize_t returnv = (ssize_t)select(socket + 1, &port, NULL, NULL, tv);
if (returnv == -1)
{
{
if (iTimeoutMs > 0)
{
- int iPollResult = poll(&fds, 1, iTarget - iNow);
+ int iPollResult = poll(&fds, 1, (int)(iTarget - iNow));
if (iPollResult == 0)
{
*iError = ETIMEDOUT;
pfd.events = POLLOUT;
pfd.revents = 0;
- int iPollResult = poll(&pfd, 1, iTimeout);
+ int iPollResult = poll(&pfd, 1, (int)iTimeout);
if (iPollResult == 0)
*iError = ETIMEDOUT;
else if (iPollResult == -1)
return dev_unlock(strDeviceName, 0) == 0;
#else
void *tmp = (void*)strDeviceName; // silence unused warning
+ tmp = NULL;
return true;
#endif
}
//setting all this stuff up is a pain in the ass
bool CSerialSocket::Open(uint64_t iTimeoutMs /* = 0 */)
{
- iTimeoutMs = 0;
+ iTimeoutMs = 0; if (!iTimeoutMs){} // silence unused warning
if (IsOpen())
{
m_iError = EINVAL;
inline bool Lock(void)
{
- MutexLock(m_mutex);
- ++m_iLockCount;
- return true;
+ if (MutexLock(m_mutex))
+ {
+ ++m_iLockCount;
+ return true;
+ }
+ return false;
}
inline void Unlock(void)
StopThread(0);
void *retVal = NULL;
if (m_thread != INVALID_THREAD_VALUE)
- ThreadsWait(m_thread, &retVal);
+ if (ThreadsWait(m_thread, &retVal)){}; // silence unused warning
}
static void *ThreadHandler(CThread *thread)