# HG changeset patch # User Bram Moolenaar # Date 1544967906 -3600 # Node ID 4b2de998ebd6d82be6292b76bd4ccab59acb54a4 # Parent 90cac240c595a52bea4e6ffc912cf3511ea578d3 patch 8.1.0601: a few compiler warnings commit https://github.com/vim/vim/commit/4efe73b478d3ba689078da502fd96f45204ff1f5 Author: Bram Moolenaar Date: Sun Dec 16 14:37:39 2018 +0100 patch 8.1.0601: a few compiler warnings Problem: A few compiler warnings. Solution: Add type casts. (Mike Williams) diff --git a/src/GvimExt/gvimext.cpp b/src/GvimExt/gvimext.cpp --- a/src/GvimExt/gvimext.cpp +++ b/src/GvimExt/gvimext.cpp @@ -1084,7 +1084,6 @@ STDMETHODIMP CShellExt::InvokeSingleGvim CloseHandle(pi.hProcess); CloseHandle(pi.hThread); } -theend: free(cmdStrW); return NOERROR; diff --git a/src/memline.c b/src/memline.c --- a/src/memline.c +++ b/src/memline.c @@ -3146,7 +3146,7 @@ ml_replace(linenr_T lnum, char_u *line, colnr_T len = -1; if (line != NULL) - len = STRLEN(line); + len = (colnr_T)STRLEN(line); return ml_replace_len(lnum, line, len, copy); } @@ -3196,14 +3196,14 @@ ml_replace_len(linenr_T lnum, char_u *li size_t textproplen = curbuf->b_ml.ml_line_len - oldtextlen; // Need to copy over text properties, stored after the text. - newline = alloc(len + 1 + textproplen); + newline = alloc(len + 1 + (int)textproplen); if (newline != NULL) { mch_memmove(newline, line, len + 1); mch_memmove(newline + len + 1, curbuf->b_ml.ml_line_ptr + oldtextlen, textproplen); vim_free(line); line = newline; - len += textproplen; + len += (colnr_T)textproplen; } } } diff --git a/src/textprop.c b/src/textprop.c --- a/src/textprop.c +++ b/src/textprop.c @@ -301,7 +301,7 @@ get_text_props(buf_T *buf, linenr_T lnum } if (proplen > 0) *props = text + textlen; - return proplen / sizeof(textprop_T); + return (int)(proplen / sizeof(textprop_T)); } static proptype_T * @@ -393,7 +393,7 @@ f_prop_clear(typval_T *argvars, typval_T buf->b_ml.ml_line_ptr = newtext; buf->b_ml.ml_flags |= ML_LINE_DIRTY; } - buf->b_ml.ml_line_len = len; + buf->b_ml.ml_line_len = (int)len; } } redraw_buf_later(buf, NOT_VALID); @@ -423,8 +423,8 @@ f_prop_list(typval_T *argvars, typval_T { char_u *text = ml_get_buf(buf, lnum, FALSE); size_t textlen = STRLEN(text) + 1; - int count = (buf->b_ml.ml_line_len - textlen) - / sizeof(textprop_T); + int count = (int)((buf->b_ml.ml_line_len - textlen) + / sizeof(textprop_T)); int i; textprop_T prop; proptype_T *pt; @@ -607,7 +607,7 @@ prop_type_set(typval_T *argvars, int add EMSG2(_("E969: Property type %s already defined"), name); return; } - prop = (proptype_T *)alloc_clear(sizeof(proptype_T) + STRLEN(name)); + prop = (proptype_T *)alloc_clear((int)(sizeof(proptype_T) + STRLEN(name))); if (prop == NULL) return; STRCPY(prop->pt_name, name); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -800,6 +800,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 601, +/**/ 600, /**/ 599,