aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/memline.c
diff options
context:
space:
mode:
authorEliseo Martínez <eliseomarmol@gmail.com>2014-10-20 20:05:40 +0200
committerEliseo Martínez <eliseomarmol@gmail.com>2014-11-06 22:53:42 +0100
commit7ffed667d4ed1214e31d9f13bc1bd30f116c1b79 (patch)
tree2a867e45b149d463a7317cec905797e29d03ae45 /src/nvim/memline.c
parentfce201e6565008a24195eba3e8162c1f383e0112 (diff)
downloadrneovim-7ffed667d4ed1214e31d9f13bc1bd30f116c1b79.tar.gz
rneovim-7ffed667d4ed1214e31d9f13bc1bd30f116c1b79.tar.bz2
rneovim-7ffed667d4ed1214e31d9f13bc1bd30f116c1b79.zip
Review: Remove long_u: memfile: Enable -Wconversion.
- Add memfile.c to converted files list. - Fix conversion issues: * bhdr_T : bh_page_count : int -> unsigned. * bhdr_T : bh_flags : char -> unsigned. * mf_new() : page_count : int -> unsigned. * mf_get() : page_count : int -> unsigned. * mf_release() : page_count : int -> unsigned. * mf_alloc_bhdr() : page_count : int -> unsigned. * mf_trans_add() : page_count : int -> unsigned. * mf_put() : flags : int -> unsigned.
Diffstat (limited to 'src/nvim/memline.c')
-rw-r--r--src/nvim/memline.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/memline.c b/src/nvim/memline.c
index 04ee0d7f55..f0062c22bd 100644
--- a/src/nvim/memline.c
+++ b/src/nvim/memline.c
@@ -41,6 +41,7 @@
* mf_get().
*/
+#include <assert.h>
#include <errno.h>
#include <inttypes.h>
#include <string.h>
@@ -2725,7 +2726,8 @@ static void ml_flush_line(buf_T *buf)
*/
static bhdr_T *ml_new_data(memfile_T *mfp, int negative, int page_count)
{
- bhdr_T *hp = mf_new(mfp, negative, page_count);
+ assert(page_count >= 0);
+ bhdr_T *hp = mf_new(mfp, negative, (unsigned)page_count);
DATA_BL *dp = (DATA_BL *)(hp->bh_data);
dp->db_id = DATA_ID;
dp->db_txt_start = dp->db_txt_end = page_count * mfp->mf_page_size;