]> granicus.if.org Git - vim/commitdiff
patch 8.1.0703: compiler warnings with 64-bit compiler v8.1.0703
authorBram Moolenaar <Bram@vim.org>
Tue, 8 Jan 2019 19:14:35 +0000 (20:14 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 8 Jan 2019 19:14:35 +0000 (20:14 +0100)
Problem:    Compiler warnings with 64-bit compiler.
Solution:   Change types, add type casts. (Mike Williams)

src/textprop.c
src/undo.c
src/version.c

index 8b7d3f15ed8aed230e3f32062eae8c04a09a2361..389bd41c1ae5fef8b9246c76e0b98eda8ba7ce56 100644 (file)
@@ -357,12 +357,12 @@ get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change)
     static void
 set_text_props(linenr_T lnum, char_u *props, int len)
 {
-    char_u *text;
-    char_u *newtext;
-    size_t textlen;
+    char_u  *text;
+    char_u  *newtext;
+    int            textlen;
 
     text = ml_get(lnum);
-    textlen = STRLEN(text) + 1;
+    textlen = (int)STRLEN(text) + 1;
     newtext = alloc(textlen + len);
     if (newtext == NULL)
        return;
index 0a015e65b0123f6211b929c61d7ba4b4f584b65b..0cb07a3ada544fd949c5f572dbec257092519d73 100644 (file)
@@ -1205,9 +1205,10 @@ serialize_header(bufinfo_T *bi, char_u *hash)
     /* buffer-specific data */
     undo_write_bytes(bi, (long_u)buf->b_ml.ml_line_count, 4);
     len = buf->b_u_line_ptr.ul_line == NULL
-                                      ? 0 : STRLEN(buf->b_u_line_ptr.ul_line);
+                               ? 0L : (long)STRLEN(buf->b_u_line_ptr.ul_line);
     undo_write_bytes(bi, (long_u)len, 4);
-    if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len) == FAIL)
+    if (len > 0 && fwrite_crypt(bi, buf->b_u_line_ptr.ul_line, (size_t)len)
+                                                                      == FAIL)
        return FAIL;
     undo_write_bytes(bi, (long_u)buf->b_u_line_lnum, 4);
     undo_write_bytes(bi, (long_u)buf->b_u_line_colnr, 4);
index 13f7909e406fbb5d6f2a54832cfc1f64ba7951ca..0693be11db49707fc692f2bfa5c108aa52c60cc1 100644 (file)
@@ -799,6 +799,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    703,
 /**/
     702,
 /**/