| To: vim_dev@googlegroups.com |
| Subject: Patch 7.3.037 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.3.037 |
| Problem: Compiler warnings for loss of data. (Mike Williams) |
| Solution: Add type casts. |
| Files: src/if_py_both.h, src/getchar.c, src/os_win32.c |
| |
| |
| |
| |
| |
| *** 154,160 **** |
| { |
| PyInt len = ptr - str; |
| |
| ! if (ga_grow(&io_ga, len + 1) == FAIL) |
| break; |
| |
| mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len); |
| --- 154,160 ---- |
| { |
| PyInt len = ptr - str; |
| |
| ! if (ga_grow(&io_ga, (int)(len + 1)) == FAIL) |
| break; |
| |
| mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)len); |
| |
| *** 166,175 **** |
| } |
| |
| /* Put the remaining text into io_ga for later printing. */ |
| ! if (n > 0 && ga_grow(&io_ga, n + 1) == OK) |
| { |
| mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)n); |
| ! io_ga.ga_len += n; |
| } |
| } |
| |
| --- 166,175 ---- |
| } |
| |
| /* Put the remaining text into io_ga for later printing. */ |
| ! if (n > 0 && ga_grow(&io_ga, (int)(n + 1)) == OK) |
| { |
| mch_memmove(((char *)io_ga.ga_data) + io_ga.ga_len, str, (size_t)n); |
| ! io_ga.ga_len += (int)n; |
| } |
| } |
| |
| |
| |
| |
| *** 3922,3928 **** |
| if (mapchars != NULL) |
| { |
| msg_puts(mapchars); |
| ! len = STRLEN(mapchars); |
| vim_free(mapchars); |
| } |
| |
| --- 3922,3928 ---- |
| if (mapchars != NULL) |
| { |
| msg_puts(mapchars); |
| ! len = (int)STRLEN(mapchars); |
| vim_free(mapchars); |
| } |
| |
| |
| |
| |
| *** 224,230 **** |
| |
| if (exe_path == NULL && exe_name != NULL) |
| { |
| ! exe_path = vim_strnsave(exe_name, gettail_sep(exe_name) - exe_name); |
| if (exe_path != NULL) |
| { |
| /* Append our starting directory to $PATH, so that when doing |
| --- 224,231 ---- |
| |
| if (exe_path == NULL && exe_name != NULL) |
| { |
| ! exe_path = vim_strnsave(exe_name, |
| ! (int)(gettail_sep(exe_name) - exe_name)); |
| if (exe_path != NULL) |
| { |
| /* Append our starting directory to $PATH, so that when doing |
| |
| *** 2374,2380 **** |
| /* To avoid a slow failure append "\*" when searching a directory, |
| * server or network share. */ |
| STRCPY(szTrueNameTemp, szTrueName); |
| ! slen = strlen(szTrueNameTemp); |
| if (*porig == psepc && slen + 2 < _MAX_PATH) |
| STRCPY(szTrueNameTemp + slen, "\\*"); |
| |
| --- 2375,2381 ---- |
| /* To avoid a slow failure append "\*" when searching a directory, |
| * server or network share. */ |
| STRCPY(szTrueNameTemp, szTrueName); |
| ! slen = (int)strlen(szTrueNameTemp); |
| if (*porig == psepc && slen + 2 < _MAX_PATH) |
| STRCPY(szTrueNameTemp + slen, "\\*"); |
| |
| |
| |
| |
| *** 716,717 **** |
| --- 716,719 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 37, |
| /**/ |
| |
| -- |
| ARTHUR: You fight with the strength of many men, Sir knight. |
| I am Arthur, King of the Britons. [pause] |
| I seek the finest and the bravest knights in the land to join me |
| in my Court of Camelot. [pause] |
| You have proved yourself worthy; will you join me? [pause] |
| You make me sad. So be it. Come, Patsy. |
| BLACK KNIGHT: None shall pass. |
| The Quest for the Holy Grail (Monty Python) |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ download, build and distribute -- http://www.A-A-P.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |