]> granicus.if.org Git - gc/commit
Eliminate 'possible loss of data' compiler warnings in cord (MS VC)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 20 Apr 2017 08:50:03 +0000 (11:50 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 24 May 2017 22:29:12 +0000 (01:29 +0300)
commit02209d75180d76d8effa331f5a4e084718ff3221
tree14ca0db5c9653e4c49bf7bdf588dfc9ceeda81e3
parentd970a7c408b1f85441662695a6844ffdb407493d
Eliminate 'possible loss of data' compiler warnings in cord (MS VC)
(Cherry-pick commit 1060ec9 from 'release-7_6' branch.)

* cord/cordbscs.c (CORD_cat_char_star, CORD_cat, CORD_from_fn_inner):
Add explicit cast in assignment of result->depth, result->len.
* cord/cordbscs.c (CORD_substr_checked): Change type of "j", "lim"
local variables from int to size_t.
* cord/cordbscs.c (CORD_init_min_len): Add explicit cast (to int) in
assignment of CORD_max_len.
* cord/cordxtra.c (CORD_ncmp): Add explicit cast (to long) when "avail"
local variable is updated.
* cord/cordxtra.c (CORD_chr, CORD_rchr, CORD_from_file_eager): Add
explicit cast to char (from int) for "c" local variable in assignment
of d.target and in CORD_ec_append call.
* cord/cordxtra.c (refill_cache): Add explicit cast to long (from
size_t) for line_start in fseek call.
* cord/tests/de.c (line_pos, fix_pos, do_command): Add explicit cast to
int in assignment of *c, line, col.
* cord/tests/de.c (do_command): Reset line, col and file_pos variables
(of different types) in separate statements.
* cord/tests/de_win.c (WinMain): Add explicit cast of msg.wParam to int
in return statement.
cord/cordbscs.c
cord/cordxtra.c
cord/tests/de.c
cord/tests/de_win.c