Explorar el Código

Fix incorrect types

These types caused an incorrect signed/unsigned behaviour, so let's make
sure we use the appropriate type.
pull/1574/head
Pierre Ossman hace 1 año
padre
commit
1d1f16f4ac

+ 1
- 1
unix/vncserver/vncsession.c Ver fichero

redir_stdio(const char *homedir, const char *display) redir_stdio(const char *homedir, const char *display)
{ {
int fd; int fd;
size_t hostlen;
long hostlen;
char* hostname = NULL; char* hostname = NULL;
char logfile[PATH_MAX]; char logfile[PATH_MAX];



+ 2
- 2
unix/x0vncserver/x0vncserver.cxx Ver fichero



static const char* defaultDesktopName() static const char* defaultDesktopName()
{ {
size_t host_max = sysconf(_SC_HOST_NAME_MAX);
long host_max = sysconf(_SC_HOST_NAME_MAX);
if (host_max < 0) if (host_max < 0)
return ""; return "";


if (pwent == NULL) if (pwent == NULL)
return ""; return "";


size_t len = snprintf(NULL, 0, "%s@%s", pwent->pw_name, hostname.data());
int len = snprintf(NULL, 0, "%s@%s", pwent->pw_name, hostname.data());
if (len < 0) if (len < 0)
return ""; return "";



+ 4
- 4
vncviewer/win32.c Ver fichero

} }


// Layout independent keys // Layout independent keys
static const int vkey_map[][3] = {
static const UINT vkey_map[][3] = {
{ VK_CANCEL, NoSymbol, XK_Break }, { VK_CANCEL, NoSymbol, XK_Break },
{ VK_BACK, XK_BackSpace, NoSymbol }, { VK_BACK, XK_BackSpace, NoSymbol },
{ VK_TAB, XK_Tab, NoSymbol }, { VK_TAB, XK_Tab, NoSymbol },
// Layout dependent keys, but without useful symbols // Layout dependent keys, but without useful symbols


// Japanese // Japanese
static const int vkey_map_jp[][3] = {
static const UINT vkey_map_jp[][3] = {
{ VK_KANA, XK_Hiragana_Katakana, NoSymbol }, { VK_KANA, XK_Hiragana_Katakana, NoSymbol },
{ VK_KANJI, XK_Kanji, NoSymbol }, { VK_KANJI, XK_Kanji, NoSymbol },
{ VK_OEM_ATTN, XK_Eisu_toggle, NoSymbol }, { VK_OEM_ATTN, XK_Eisu_toggle, NoSymbol },
}; };


// Korean // Korean
static const int vkey_map_ko[][3] = {
static const UINT vkey_map_ko[][3] = {
{ VK_HANGUL, XK_Hangul, NoSymbol }, { VK_HANGUL, XK_Hangul, NoSymbol },
{ VK_HANJA, XK_Hangul_Hanja, NoSymbol }, { VK_HANJA, XK_Hangul_Hanja, NoSymbol },
}; };


static int lookup_vkey_map(UINT vkey, int extended, const int map[][3], size_t size)
static int lookup_vkey_map(UINT vkey, int extended, const UINT map[][3], size_t size)
{ {
size_t i; size_t i;



+ 1
- 1
win/rfb_win32/RegConfig.cxx Ver fichero

} }


void RegConfigThread::worker() { void RegConfigThread::worker() {
DWORD result = 0;
BOOL result = 0;
MSG msg; MSG msg;
thread_id = GetCurrentThreadId(); thread_id = GetCurrentThreadId();
while ((result = eventMgr.getMessage(&msg, 0, 0, 0)) > 0) {} while ((result = eventMgr.getMessage(&msg, 0, 0, 0)) > 0) {}

Cargando…
Cancelar
Guardar