To: vim_dev@googlegroups.com Subject: Patch 7.4.1863 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1863 Problem: Compiler warnings on Win64. Solution: Adjust types, add type casts. (Ken Takata) Files: src/if_mzsch.c, src/if_perl.xs, src/if_ruby.c, src/version.c *** ../vim-7.4.1862/src/if_mzsch.c 2016-03-30 22:02:58.645307771 +0200 --- src/if_mzsch.c 2016-06-01 20:28:48.437553378 +0200 *************** *** 545,551 **** # if MZSCHEME_VERSION_MAJOR >= 500 # if defined(IMPLEMENT_THREAD_LOCAL_VIA_WIN_TLS) || defined(IMPLEMENT_THREAD_LOCAL_EXTERNALLY_VIA_PROC) ! /* define as function for macro in schshread.h */ Thread_Local_Variables * scheme_external_get_thread_local_variables(void) { --- 545,551 ---- # if MZSCHEME_VERSION_MAJOR >= 500 # if defined(IMPLEMENT_THREAD_LOCAL_VIA_WIN_TLS) || defined(IMPLEMENT_THREAD_LOCAL_EXTERNALLY_VIA_PROC) ! /* define as function for macro in schthread.h */ Thread_Local_Variables * scheme_external_get_thread_local_variables(void) { *************** *** 894,900 **** /* timers are presented in GUI only */ # if defined(FEAT_GUI_W32) static void CALLBACK ! timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT idEvent UNUSED, DWORD dwTime UNUSED) # elif defined(FEAT_GUI_GTK) # if GTK_CHECK_VERSION(3,0,0) static gboolean --- 894,900 ---- /* timers are presented in GUI only */ # if defined(FEAT_GUI_W32) static void CALLBACK ! timer_proc(HWND hwnd UNUSED, UINT uMsg UNUSED, UINT_PTR idEvent UNUSED, DWORD dwTime UNUSED) # elif defined(FEAT_GUI_GTK) # if GTK_CHECK_VERSION(3,0,0) static gboolean *************** *** 3571,3577 **** info = scheme_make_byte_string(add_info); MZ_GC_CHECK(); ! c_string = scheme_format_utf8(fmt, STRLEN(fmt), 1, &info, NULL); MZ_GC_CHECK(); byte_string = scheme_make_byte_string(c_string); MZ_GC_CHECK(); --- 3571,3577 ---- info = scheme_make_byte_string(add_info); MZ_GC_CHECK(); ! c_string = scheme_format_utf8(fmt, (int)STRLEN(fmt), 1, &info, NULL); MZ_GC_CHECK(); byte_string = scheme_make_byte_string(c_string); MZ_GC_CHECK(); *** ../vim-7.4.1862/src/if_perl.xs 2016-05-26 22:09:56.088600919 +0200 --- src/if_perl.xs 2016-06-01 20:28:48.441553378 +0200 *************** *** 1075,1081 **** { size_t len = 0; char * str_from = SvPV(sv, len); ! char_u *str_to = (char_u*)alloc(sizeof(char_u) * (len + 1)); if (str_to) { str_to[len] = '\0'; --- 1075,1082 ---- { size_t len = 0; char * str_from = SvPV(sv, len); ! char_u *str_to = (char_u*)alloc( ! (unsigned)(sizeof(char_u) * (len + 1))); if (str_to) { str_to[len] = '\0'; *************** *** 1370,1382 **** char_u *str; PerlIOVim * s = PerlIOSelf(f, PerlIOVim); ! str = vim_strnsave((char_u *)vbuf, count); if (str == NULL) return 0; msg_split((char_u *)str, s->attr); vim_free(str); ! return count; } static PERLIO_FUNCS_DECL(PerlIO_Vim) = { --- 1371,1383 ---- char_u *str; PerlIOVim * s = PerlIOSelf(f, PerlIOVim); ! str = vim_strnsave((char_u *)vbuf, (int)count); if (str == NULL) return 0; msg_split((char_u *)str, s->attr); vim_free(str); ! return (SSize_t)count; } static PERLIO_FUNCS_DECL(PerlIO_Vim) = { *** ../vim-7.4.1862/src/if_ruby.c 2016-03-30 22:06:13.223315581 +0200 --- src/if_ruby.c 2016-06-01 20:28:48.441553378 +0200 *************** *** 733,739 **** vim_free(sval); if (enc) { ! return rb_enc_str_new(s, strlen(s), enc); } } #endif --- 733,739 ---- vim_free(sval); if (enc) { ! return rb_enc_str_new(s, (long)strlen(s), enc); } } #endif *** ../vim-7.4.1862/src/version.c 2016-05-31 22:31:19.782640756 +0200 --- src/version.c 2016-06-01 20:29:43.373552623 +0200 *************** *** 5077,5083 **** if (*mesg == ' ') { vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); ! l = STRLEN(modby); vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); mesg = modby; } --- 5079,5085 ---- if (*mesg == ' ') { vim_strncpy(modby, (char_u *)_("Modified by "), MODBY_LEN - 1); ! l = (int)STRLEN(modby); vim_strncpy(modby + l, (char_u *)MODIFIED_BY, MODBY_LEN - l - 1); mesg = modby; } *** ../vim-7.4.1862/src/version.c 2016-05-31 22:31:19.782640756 +0200 --- src/version.c 2016-06-01 20:29:43.373552623 +0200 *************** *** 755,756 **** --- 755,758 ---- { /* Add new patch number below this line */ + /**/ + 1863, /**/ -- 'Well, here's something to occupy you and keep your mind off things.' 'It won't work, I have an exceptionally large mind.' -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///