winpr: fix build warnings

This commit is contained in:
Marc-André Moreau 2014-11-21 15:12:49 -05:00
parent ba5389d9d0
commit 0818846d7c
2 changed files with 6 additions and 4 deletions

View File

@ -148,7 +148,7 @@ void ClipboardUnlock(wClipboard* clipboard)
BOOL ClipboardEmpty(wClipboard* clipboard)
{
if (!clipboard)
return NULL;
return FALSE;
if (clipboard->data)
{

View File

@ -296,9 +296,9 @@ static void winpr_StartThread(WINPR_THREAD *thread)
HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize,
LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId)
{
int flags;
HANDLE handle;
WINPR_THREAD* thread;
thread = (WINPR_THREAD*) calloc(1, sizeof(WINPR_THREAD));
if (!thread)
@ -332,8 +332,10 @@ HANDLE CreateThread(LPSECURITY_ATTRIBUTES lpThreadAttributes, SIZE_T dwStackSize
return NULL;
}
flags = fcntl(thread->pipe_fd[0], F_GETFL);
fcntl(thread->pipe_fd[0], F_SETFL, flags | O_NONBLOCK);
{
int flags = fcntl(thread->pipe_fd[0], F_GETFL);
fcntl(thread->pipe_fd[0], F_SETFL, flags | O_NONBLOCK);
}
#endif
pthread_mutex_init(&thread->mutex, 0);