Skip to content

Commit f5785cf

Browse files
Mike Williamsbrammool
Mike Williams
authored andcommitted
patch 8.2.3437: compiler warnings for 32/64 bit usage
Problem: Compiler warnings for 32/64 bit usage. Solution: Add type casts. (Mike Williams, closes #8870)
1 parent a29856f commit f5785cf

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

src/screen.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4855,7 +4855,7 @@ set_chars_option(win_T *wp, char_u **varp)
48554855
{
48564856
lcs_chars.tab1 = NUL;
48574857
lcs_chars.tab3 = NUL;
4858-
if (multispace_len)
4858+
if (multispace_len > 0)
48594859
{
48604860
lcs_chars.multispace = ALLOC_MULT(int, multispace_len + 1);
48614861
lcs_chars.multispace[multispace_len] = NUL;
@@ -4904,7 +4904,7 @@ set_chars_option(win_T *wp, char_u **varp)
49044904

49054905
if (*s == ',' || *s == NUL)
49064906
{
4907-
if (round)
4907+
if (round > 0)
49084908
{
49094909
if (tab[i].cp == &lcs_chars.tab2)
49104910
{
@@ -4924,7 +4924,7 @@ set_chars_option(win_T *wp, char_u **varp)
49244924

49254925
if (i == entries)
49264926
{
4927-
len = STRLEN("multispace");
4927+
len = (int)STRLEN("multispace");
49284928
if ((varp == &p_lcs || varp == &wp->w_p_lcs)
49294929
&& STRNCMP(p, "multispace", len) == 0
49304930
&& p[len] == ':'
@@ -4951,6 +4951,7 @@ set_chars_option(win_T *wp, char_u **varp)
49514951
else
49524952
{
49534953
int multispace_pos = 0;
4954+
49544955
while (*s != NUL && *s != ',')
49554956
{
49564957
c1 = mb_ptr2char_adv(&s);

src/version.c

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

756756
static int included_patches[] =
757757
{ /* Add new patch number below this line */
758+
/**/
759+
3437,
758760
/**/
759761
3436,
760762
/**/

src/xdiff/xemit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static long xdl_get_rec(xdfile_t *xdf, long ri, char const **rec) {
3131

3232

3333
static int xdl_emit_record(xdfile_t *xdf, long ri, char const *pre, xdemitcb_t *ecb) {
34-
long size, psize = strlen(pre);
34+
long size, psize = (long)strlen(pre);
3535
char const *rec;
3636

3737
size = xdl_get_rec(xdf, ri, &rec);

src/xdiff/xutils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int xdl_emit_diffrec(char const *rec, long size, char const *pre, long psize,
4747
mb[1].size = size;
4848
if (size > 0 && rec[size - 1] != '\n') {
4949
mb[2].ptr = (char *) "\n\\ No newline at end of file\n";
50-
mb[2].size = strlen(mb[2].ptr);
50+
mb[2].size = (long)strlen(mb[2].ptr);
5151
i++;
5252
}
5353
if (ecb->out_line(ecb->priv, mb, i) < 0) {

0 commit comments

Comments
 (0)