diff --git a/windows/windlg.c b/windows/windlg.c index adb0639f..6c5cc508 100644 --- a/windows/windlg.c +++ b/windows/windlg.c @@ -923,7 +923,7 @@ static INT_PTR CALLBACK HostKeyDialogProc(HWND hwnd, UINT msg, HDC hdc = (HDC)wParam; HWND control = (HWND)lParam; - if (GetWindowLong(control, GWL_ID) == IDC_HK_TITLE) { + if (GetWindowLong(control, GWLP_ID) == IDC_HK_TITLE) { SetBkMode(hdc, TRANSPARENT); HFONT prev_font = (HFONT)SelectObject( hdc, (HFONT)GetStockObject(SYSTEM_FONT)); diff --git a/windows/winser.c b/windows/winser.c index e387b4b0..7f4bcf2e 100644 --- a/windows/winser.c +++ b/windows/winser.c @@ -125,10 +125,12 @@ static char *serial_configure(Serial *serial, HANDLE serport, Conf *conf) * Configurable parameters. */ dcb.BaudRate = conf_get_int(conf, CONF_serspeed); - logeventf(serial->logctx, "Configuring baud rate %lu", dcb.BaudRate); + logeventf(serial->logctx, "Configuring baud rate %lu", + (unsigned long)dcb.BaudRate); dcb.ByteSize = conf_get_int(conf, CONF_serdatabits); - logeventf(serial->logctx, "Configuring %u data bits", dcb.ByteSize); + logeventf(serial->logctx, "Configuring %u data bits", + (unsigned)dcb.ByteSize); switch (conf_get_int(conf, CONF_serstopbits)) { case 2: dcb.StopBits = ONESTOPBIT; str = "1 stop bit"; break;