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.
This commit is contained in:
Eliseo Martínez
2014-10-20 20:05:40 +02:00
parent fce201e656
commit 7ffed667d4
4 changed files with 26 additions and 18 deletions

View File

@@ -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;