These types caused an incorrect signed/unsigned behaviour, so let's make sure we use the appropriate type.pull/1574/head
@@ -349,7 +349,7 @@ static void | |||
redir_stdio(const char *homedir, const char *display) | |||
{ | |||
int fd; | |||
size_t hostlen; | |||
long hostlen; | |||
char* hostname = NULL; | |||
char logfile[PATH_MAX]; | |||
@@ -78,7 +78,7 @@ StringParameter interface("interface", | |||
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) | |||
return ""; | |||
@@ -90,7 +90,7 @@ static const char* defaultDesktopName() | |||
if (pwent == NULL) | |||
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) | |||
return ""; | |||
@@ -142,7 +142,7 @@ void win32_disable_lowlevel_keyboard(HWND hwnd) | |||
} | |||
// Layout independent keys | |||
static const int vkey_map[][3] = { | |||
static const UINT vkey_map[][3] = { | |||
{ VK_CANCEL, NoSymbol, XK_Break }, | |||
{ VK_BACK, XK_BackSpace, NoSymbol }, | |||
{ VK_TAB, XK_Tab, NoSymbol }, | |||
@@ -233,7 +233,7 @@ static const int vkey_map[][3] = { | |||
// Layout dependent keys, but without useful symbols | |||
// Japanese | |||
static const int vkey_map_jp[][3] = { | |||
static const UINT vkey_map_jp[][3] = { | |||
{ VK_KANA, XK_Hiragana_Katakana, NoSymbol }, | |||
{ VK_KANJI, XK_Kanji, NoSymbol }, | |||
{ VK_OEM_ATTN, XK_Eisu_toggle, NoSymbol }, | |||
@@ -248,12 +248,12 @@ static const int vkey_map_jp[][3] = { | |||
}; | |||
// Korean | |||
static const int vkey_map_ko[][3] = { | |||
static const UINT vkey_map_ko[][3] = { | |||
{ VK_HANGUL, XK_Hangul, 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; | |||
@@ -108,7 +108,7 @@ bool RegConfigThread::start(const HKEY rootKey, const TCHAR* keyname) { | |||
} | |||
void RegConfigThread::worker() { | |||
DWORD result = 0; | |||
BOOL result = 0; | |||
MSG msg; | |||
thread_id = GetCurrentThreadId(); | |||
while ((result = eventMgr.getMessage(&msg, 0, 0, 0)) > 0) {} |