diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-12-16 14:37:39 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-12-16 14:37:39 +0100 |
commit | 4efe73b478d3ba689078da502fd96f45204ff1f5 (patch) | |
tree | c205c34c6eae39caa184af7b7a076df3bdab65f7 /src/textprop.c | |
parent | d80232be5428f9df889f4e977e24117e162de67a (diff) | |
download | vim-git-4efe73b478d3ba689078da502fd96f45204ff1f5.tar.gz |
patch 8.1.0601: a few compiler warningsv8.1.0601
Problem: A few compiler warnings.
Solution: Add type casts. (Mike Williams)
Diffstat (limited to 'src/textprop.c')
-rw-r--r-- | src/textprop.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/textprop.c b/src/textprop.c index 3e0207da3..05df2e139 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -301,7 +301,7 @@ get_text_props(buf_T *buf, linenr_T lnum, char_u **props, int will_change) } 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 *rettv UNUSED) 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 *rettv) { 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); |