rdpdr: fix warnings, directfb: fix warnings

This commit is contained in:
Marc-André Moreau 2011-11-25 11:24:47 -05:00
parent b40ce40449
commit 7371d203cb
2 changed files with 12 additions and 18 deletions

View File

@ -244,7 +244,7 @@ DISK_FILE* disk_file_new(const char* base_path, const char* path, uint32 id,
file = xnew(DISK_FILE); file = xnew(DISK_FILE);
file->id = id; file->id = id;
file->basepath = base_path; file->basepath = (char*) base_path;
disk_file_set_fullpath(file, disk_file_combine_fullpath(base_path, path)); disk_file_set_fullpath(file, disk_file_combine_fullpath(base_path, path));
file->fd = -1; file->fd = -1;
@ -374,17 +374,16 @@ boolean disk_file_query_information(DISK_FILE* file, uint32 FsInformationClass,
boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input) boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, uint32 Length, STREAM* input)
{ {
char* s;
mode_t m;
uint64 size;
char* fullpath;
struct stat st; struct stat st;
UNICONV* uniconv;
struct timeval tv[2]; struct timeval tv[2];
uint64 LastWriteTime; uint64 LastWriteTime;
uint32 FileAttributes; uint32 FileAttributes;
mode_t m;
uint64 size;
uint32 FileNameLength; uint32 FileNameLength;
UNICONV* uniconv;
char* s;
char* p;
char* fullpath;
switch (FsInformationClass) switch (FsInformationClass)
{ {
@ -398,6 +397,7 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui
if (fstat(file->fd, &st) != 0) if (fstat(file->fd, &st) != 0)
return false; return false;
tv[0].tv_sec = st.st_atime; tv[0].tv_sec = st.st_atime;
tv[0].tv_usec = 0; tv[0].tv_usec = 0;
tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime); tv[1].tv_sec = (LastWriteTime > 0 ? FILE_TIME_RDP_TO_SYSTEM(LastWriteTime) : st.st_mtime);
@ -460,6 +460,7 @@ boolean disk_file_set_information(DISK_FILE* file, uint32 FsInformationClass, ui
DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass); DEBUG_WARN("invalid FsInformationClass %d", FsInformationClass);
return false; return false;
} }
return true; return true;
} }

View File

@ -185,18 +185,11 @@ void df_send_keyboard_event(rdpInput* input, boolean down, uint8 keycode, uint8
boolean extended; boolean extended;
if (keycode) if (keycode)
{
vkcode = keymap[keycode]; vkcode = keymap[keycode];
}
else if (function) else if (function)
{
vkcode = functionmap[function]; vkcode = functionmap[function];
} else
if (!vkcode)
{
return; return;
}
scancode = freerdp_kbd_get_scancode_by_virtualkey(vkcode, &extended); scancode = freerdp_kbd_get_scancode_by_virtualkey(vkcode, &extended);
@ -208,11 +201,11 @@ void df_send_keyboard_event(rdpInput* input, boolean down, uint8 keycode, uint8
boolean df_event_process(freerdp* instance, DFBEvent* event) boolean df_event_process(freerdp* instance, DFBEvent* event)
{ {
int flags;
rdpGdi* gdi; rdpGdi* gdi;
dfInfo* dfi; dfInfo* dfi;
int pointer_x; int pointer_x;
int pointer_y; int pointer_y;
int flags;
DFBInputEvent* input_event; DFBInputEvent* input_event;
gdi = instance->context->gdi; gdi = instance->context->gdi;