Skip to content

Commit d3bb6a8

Browse files
committed
patch 8.2.1299: compiler warning for using size_t for int and void pointer
Problem: Compiler warning for using size_t for int and void pointer. Solution: Add type casts.
1 parent cb4f69c commit d3bb6a8

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/scriptfile.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,18 @@ estack_sfile(int is_sfile UNUSED)
157157
last_type = entry->es_type;
158158
}
159159
len += STRLEN(type_name);
160-
if (ga_grow(&ga, len) == FAIL)
160+
if (ga_grow(&ga, (int)len) == FAIL)
161161
break;
162162
if (idx == exestack.ga_len - 1 || entry->es_lnum == 0)
163163
// For the bottom entry: do not add the line number, it is used
164164
// in <slnum>. Also leave it out when the number is not set.
165-
vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s%s",
165+
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s%s",
166166
type_name, entry->es_name,
167167
idx == exestack.ga_len - 1 ? "" : "..");
168168
else
169-
vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
169+
vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
170170
type_name, entry->es_name, entry->es_lnum);
171-
ga.ga_len += STRLEN(ga.ga_data + ga.ga_len);
171+
ga.ga_len += (int)STRLEN((char *)ga.ga_data + ga.ga_len);
172172
}
173173
}
174174

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ static char *(features[]) =
754754

755755
static int included_patches[] =
756756
{ /* Add new patch number below this line */
757+
/**/
758+
1299,
757759
/**/
758760
1298,
759761
/**/

0 commit comments

Comments
 (0)