1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1376
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 8.1.1376
Problem: Warnings for size_t/int mixups.
Solution: Change types, add type casts. (Mike Williams)
Files: src/search.c, src/textprop.c
*** ../vim-8.1.1375/src/search.c 2019-05-24 13:11:44.307032864 +0200
--- src/search.c 2019-05-24 13:17:33.453080969 +0200
***************
*** 4990,4996 ****
if (cur > 0)
{
char t[SEARCH_STAT_BUF_LEN] = "";
! int len;
#ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
--- 4990,4996 ----
if (cur > 0)
{
char t[SEARCH_STAT_BUF_LEN] = "";
! size_t len;
#ifdef FEAT_RIGHTLEFT
if (curwin->w_p_rl && *curwin->w_p_rlc == 's')
*** ../vim-8.1.1375/src/textprop.c 2019-05-19 22:53:36.504914607 +0200
--- src/textprop.c 2019-05-24 13:17:33.453080969 +0200
***************
*** 1203,1209 ****
size_t oldproplen;
char_u *props;
int i;
! int len;
char_u *line;
size_t l;
--- 1203,1209 ----
size_t oldproplen;
char_u *props;
int i;
! size_t len;
char_u *line;
size_t l;
***************
*** 1218,1225 ****
// get existing properties of the joined line
oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
! len = (int)STRLEN(newp) + 1;
! line = alloc(len + (oldproplen + proplen) * (int)sizeof(textprop_T));
if (line == NULL)
return;
mch_memmove(line, newp, len);
--- 1218,1225 ----
// get existing properties of the joined line
oldproplen = get_text_props(curbuf, lnum, &props, FALSE);
! len = STRLEN(newp) + 1;
! line = alloc((int)(len + (oldproplen + proplen) * sizeof(textprop_T)));
if (line == NULL)
return;
mch_memmove(line, newp, len);
***************
*** 1236,1242 ****
vim_free(prop_lines[i]);
}
! ml_replace_len(lnum, line, len, TRUE, FALSE);
vim_free(newp);
vim_free(prop_lines);
vim_free(prop_lengths);
--- 1236,1242 ----
vim_free(prop_lines[i]);
}
! ml_replace_len(lnum, line, (colnr_T)len, TRUE, FALSE);
vim_free(newp);
vim_free(prop_lines);
vim_free(prop_lengths);
*** ../vim-8.1.1375/src/version.c 2019-05-24 13:11:44.311032841 +0200
--- src/version.c 2019-05-24 13:20:44.412124324 +0200
***************
*** 769,770 ****
--- 769,772 ----
{ /* Add new patch number below this line */
+ /**/
+ 1376,
/**/
--
How To Keep A Healthy Level Of Insanity:
2. Page yourself over the intercom. Don't disguise your voice.
/// 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 ///
|