Fixed compiler warnings.

This commit is contained in:
Armin Novak 2018-10-03 15:16:59 +02:00
parent 2e1bf90bd9
commit a8a6accc15
5 changed files with 9 additions and 7 deletions

View File

@ -984,7 +984,7 @@ static UINT drdynvc_process_create_request(drdynvcPlugin* drdynvc, int Sp,
ChannelId = drdynvc_read_variable_uint(s, cbChId);
pos = Stream_GetPosition(s);
name = Stream_Pointer(s);
name = (char*)Stream_Pointer(s);
length = Stream_GetRemainingLength(s);
if (strnlen(name, length) >= length)

View File

@ -497,14 +497,15 @@ static DWORD filter_device_by_name_w(wLinkedList* list, LPWSTR* mszReaders, DWOR
if (LinkedList_Count(list) < 1)
return cchReaders;
if (ConvertFromUnicode(CP_UTF8, 0, *mszReaders, cchReaders, &readers, 0, NULL, NULL) != cchReaders)
if (ConvertFromUnicode(CP_UTF8, 0, *mszReaders, (int)cchReaders, &readers, 0, NULL,
NULL) != cchReaders)
return 0;
free(*mszReaders);
*mszReaders = NULL;
rc = filter_device_by_name_a(list, &readers, cchReaders);
if (ConvertToUnicode(CP_UTF8, 0, &readers, rc, mszReaders, 0) != rc)
if (ConvertToUnicode(CP_UTF8, 0, readers, (int)rc, mszReaders, 0) != rc)
rc = 0;
free(readers);

View File

@ -110,8 +110,8 @@
#define _PATH_DEVNULL "/dev/null"
char socket_name[PATH_MAX];
char socket_dir[PATH_MAX];
static char socket_name[PATH_MAX];
static char socket_dir[PATH_MAX];
static int sa_uds_fd = -1;
static int is_going = 1;
@ -156,7 +156,7 @@ setup_ssh_agent(struct sockaddr_un* addr)
exit(1);
}
snprintf(socket_name, sizeof socket_name, "%s/agent.%ld", socket_dir,
snprintf(socket_name, sizeof(socket_name), "%s/agent.%ld", socket_dir,
(long)getpid());
/* Create unix domain socket */
unlink(socket_name);

View File

@ -452,4 +452,5 @@ BOOL xf_disp_uninit(xfDispContext* xfDisp, DispClientContext* disp)
return FALSE;
xfDisp->disp = NULL;
return TRUE;
}

View File

@ -593,7 +593,7 @@ BOOL freerdp_dsp_ffmpeg_decode(FREERDP_DSP_CONTEXT* context, const AUDIO_FORMAT*
return FALSE;
av_init_packet(context->packet);
context->packet->data = data;
context->packet->data = (uint8_t*)data;
context->packet->size = length;
return ffmpeg_decode(context->context, context->packet, context->frame,
context->rcontext, context->resampled, out);