diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2021-09-24 02:29:49 -0700 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2021-09-24 02:29:49 -0700 |
commit | 0d59c01a64906bd1e0792193e1d1a31ab25995c4 (patch) | |
tree | 8aec2ddf118f12cfb045f4f6a946077cb4689e39 /src | |
parent | d15defeb2f3b964510e0e6013a7efef7613ad26d (diff) | |
download | rneovim-0d59c01a64906bd1e0792193e1d1a31ab25995c4.tar.gz rneovim-0d59c01a64906bd1e0792193e1d1a31ab25995c4.tar.bz2 rneovim-0d59c01a64906bd1e0792193e1d1a31ab25995c4.zip |
fix(PVS V576): wrong fprintf() format
https://pvs-studio.com/en/docs/warnings/v576/
Before 1bffe66508ff986a61c0e08caddc92b7f3ace81e this was originally
"%ld" but that looks like a mistake. At least now, w_height_inner and
w_width_inner are just `int`.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ex_session.c b/src/nvim/ex_session.c index 11e8353e3a..4aadd77d45 100644 --- a/src/nvim/ex_session.c +++ b/src/nvim/ex_session.c @@ -450,11 +450,11 @@ static int put_view(FILE *fd, win_T *wp, int add_edit, unsigned *flagp, int curr } } else if (fprintf(fd, "let s:l = %" PRIdLINENR " - ((%" PRIdLINENR - " * winheight(0) + %" PRId64 ") / %" PRId64 ")\n", + " * winheight(0) + %d) / %d)\n", wp->w_cursor.lnum, wp->w_cursor.lnum - wp->w_topline, - (int64_t)(wp->w_height_inner / 2), - (int64_t)wp->w_height_inner) < 0) { + (wp->w_height_inner / 2), + wp->w_height_inner) < 0) { return FAIL; } if (fprintf(fd, |