]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winctrls.c
first pass
[PuTTY.git] / windows / winctrls.c
index 9bee927472d5fb36bd7e1a653682bd6cbe99e6ba..a03967e6f81917a07e9669ea89448ba9b57098d7 100644 (file)
@@ -76,7 +76,7 @@ HWND doctl(struct ctlpos *cp, RECT r,
     if (cp->hwnd) {
        ctl = CreateWindowEx(exstyle, wclass, wtext, wstyle,
                             r.left, r.top, r.right, r.bottom,
-                            cp->hwnd, (HMENU) wid, hinst, NULL);
+                            cp->hwnd, (HMENU)(ULONG_PTR)wid, hinst, NULL);
        SendMessage(ctl, WM_SETFONT, cp->font, MAKELPARAM(TRUE, 0));
 
        if (!strcmp(wclass, "LISTBOX")) {
@@ -267,10 +267,9 @@ void radioline(struct ctlpos *cp, char *text, int id, int nacross, ...)
     nbuttons = 0;
     while (1) {
        char *btext = va_arg(ap, char *);
-       int bid;
        if (!btext)
            break;
-       bid = va_arg(ap, int);
+       (void) va_arg(ap, int); /* id */
        nbuttons++;
     }
     va_end(ap);
@@ -299,10 +298,10 @@ void bareradioline(struct ctlpos *cp, int nacross, ...)
     nbuttons = 0;
     while (1) {
        char *btext = va_arg(ap, char *);
-       int bid;
        if (!btext)
            break;
-       bid = va_arg(ap, int);
+       (void) va_arg(ap, int); /* id */
+        nbuttons++;
     }
     va_end(ap);
     buttons = snewn(nbuttons, struct radio);
@@ -330,10 +329,10 @@ void radiobig(struct ctlpos *cp, char *text, int id, ...)
     nbuttons = 0;
     while (1) {
        char *btext = va_arg(ap, char *);
-       int bid;
        if (!btext)
            break;
-       bid = va_arg(ap, int);
+       (void) va_arg(ap, int); /* id */
+        nbuttons++;
     }
     va_end(ap);
     buttons = snewn(nbuttons, struct radio);
@@ -372,7 +371,6 @@ void checkbox(struct ctlpos *cp, char *text, int id)
 char *staticwrap(struct ctlpos *cp, HWND hwnd, char *text, int *lines)
 {
     HDC hdc = GetDC(hwnd);
-    int lpx = GetDeviceCaps(hdc, LOGPIXELSX);
     int width, nlines, j;
     INT *pwidths, nfit;
     SIZE size;
@@ -2406,7 +2404,7 @@ void dlg_beep(void *dlg)
     MessageBeep(0);
 }
 
-void dlg_error_msg(void *dlg, char *msg)
+void dlg_error_msg(void *dlg, const char *msg)
 {
     struct dlgparam *dp = (struct dlgparam *)dlg;
     MessageBox(dp->hwnd, msg,