To: vim-dev@vim.org Subject: Patch 6.2.038 (extra) Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.038 (extra) Problem: Warning messages when using the MingW compiler. (Bill McCarthy) Solution: Initialize variables, add parenthesis. Files: src/eval.c, src/os_win32.c, src/gui_w32.c, src/dosinst.c *** ../vim-6.2.037/src/eval.c Fri May 30 21:11:19 2003 --- src/eval.c Thu Jun 26 22:06:05 2003 *************** *** 6333,6339 **** { #ifdef FEAT_CLIENTSERVER var v; ! char_u *s; # ifdef WIN32 int n = 0; # endif --- 6354,6360 ---- { #ifdef FEAT_CLIENTSERVER var v; ! char_u *s = NULL; # ifdef WIN32 int n = 0; # endif *** ../vim-6.2.037/src/os_win32.c Sat May 17 16:27:03 2003 --- src/os_win32.c Wed Jul 9 01:45:05 2003 *************** *** 242,248 **** {"gettext", (FARPROC*)&dyn_libintl_gettext}, {"textdomain", (FARPROC*)&dyn_libintl_textdomain}, {"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain}, ! NULL, NULL }; /* No need to initialize twice. */ --- 242,248 ---- {"gettext", (FARPROC*)&dyn_libintl_gettext}, {"textdomain", (FARPROC*)&dyn_libintl_textdomain}, {"bindtextdomain", (FARPROC*)&dyn_libintl_bindtextdomain}, ! {NULL, NULL} }; /* No need to initialize twice. */ *************** *** 1213,1220 **** #ifdef FEAT_CLIENTSERVER (void)WaitForChar(-1L); ! if (input_available() || g_nMouseClick != -1) return 0; #endif if (ReadConsoleInput(g_hConIn, &ir, 1, &cRecords) == 0) { --- 1213,1224 ---- #ifdef FEAT_CLIENTSERVER (void)WaitForChar(-1L); ! if (input_available()) return 0; + # ifdef FEAT_MOUSE + if (g_nMouseClick != -1) + return 0; + # endif #endif if (ReadConsoleInput(g_hConIn, &ir, 1, &cRecords) == 0) { *** ../vim-6.2.037/src/gui_w32.c Thu Jul 24 21:08:45 2003 --- src/gui_w32.c Sun Jun 22 17:13:50 2003 *************** *** 1571,1577 **** static WCHAR *unicodebuf = NULL; static int *unicodepdy = NULL; int unibuflen = 0; ! int n; #endif HPEN hpen, old_pen; int y; --- 1571,1577 ---- static WCHAR *unicodebuf = NULL; static int *unicodepdy = NULL; int unibuflen = 0; ! int n = 0; #endif HPEN hpen, old_pen; int y; *************** *** 2248,2254 **** int dlgwidth = 0; int dlgheight; int editboxheight; ! int horizWidth; int msgheight; char_u *pstart; char_u *pend; --- 2248,2254 ---- int dlgwidth = 0; int dlgheight; int editboxheight; ! int horizWidth = 0; int msgheight; char_u *pstart; char_u *pend; *************** *** 2498,2504 **** buttonYpos += editboxheight; pstart = tbuffer; ! horizWidth = (dlgwidth - horizWidth) / 2; /* Now it's X offset */ for (i = 0; i < numButtons; i++) { /* get end of this button. */ --- 2498,2505 ---- buttonYpos += editboxheight; pstart = tbuffer; ! if (!vertical) ! horizWidth = (dlgwidth - horizWidth) / 2; /* Now it's X offset */ for (i = 0; i < numButtons; i++) { /* get end of this button. */ *** ../vim-6.2.037/src/dosinst.c Tue May 13 20:45:28 2003 --- src/dosinst.c Sun Jun 22 17:15:59 2003 *************** *** 20,26 **** #include "dosinst.h" /* Macro to do an error check I was typing over and over */ ! #define CHECK_REG_ERROR(code) if (code != ERROR_SUCCESS) { printf("%d error number: %d\n", __LINE__, code); return 1; } int has_vim = 0; /* installable vim.exe exists */ int has_gvim = 0; /* installable gvim.exe exists */ --- 20,26 ---- #include "dosinst.h" /* Macro to do an error check I was typing over and over */ ! #define CHECK_REG_ERROR(code) if (code != ERROR_SUCCESS) { printf("%ld error number: %ld\n", (long)__LINE__, (long)code); return 1; } int has_vim = 0; /* installable vim.exe exists */ int has_gvim = 0; /* installable gvim.exe exists */ *************** *** 1492,1498 **** } else { ! printf("CoCreateInstance Error - hres = %08x\n", hres); return FAIL; } --- 1492,1498 ---- } else { ! printf("CoCreateInstance Error - hres = %08x\n", (int)hres); return FAIL; } *** ../vim-6.2.037/src/version.c Fri Jul 25 22:35:52 2003 --- src/version.c Fri Jul 25 22:40:26 2003 *************** *** 632,633 **** --- 632,635 ---- { /* Add new patch number below this line */ + /**/ + 38, /**/ -- I used to wonder about the meaning of life. But I looked it up in the dictionary under "L" and there it was - the meaning of life. It was less than I expected. - Dogbert /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///