mirror of
https://github.com/neovim/neovim.git
synced 2026-08-02 04:51:38 +08:00
CID 652079: (UNINIT)
/src/nvim/bufwrite.c: 1413 in buf_write()
1407 // only makes sense at the start of the file.
1408 if (buf->b_p_bomb && !write_bin && (!append || perm < 0)) {
1409 write_info.bw_len = make_bom(buffer, fenc);
1410 if (write_info.bw_len > 0) {
1411 // don't convert
1412 write_info.bw_flags = FIO_NOCONVERT | wb_flags;
>>> CID 652079: (UNINIT)
>>> Using uninitialized value "write_info.bw_first" when calling "buf_write_bytes".
1413 if (buf_write_bytes(&write_info) == FAIL) {
1414 end = 0;
1415 } else {
1416 nchars += write_info.bw_len;
1417 }
1418 }
/src/nvim/bufwrite.c: 1453 in buf_write()
1447 *s = c;
1448 }
1449 s++;
1450 if (++write_info.bw_len != bufsize) {
1451 continue;
1452 }
>>> CID 652079: (UNINIT)
>>> Using uninitialized value "write_info.bw_first" when calling "buf_write_bytes".
1453 if (buf_write_bytes(&write_info) == FAIL) {
1454 end = 0; // write error: break loop
1455 break;
1456 }
1457 nchars += bufsize - write_info.bw_len;
1458 s = buffer + write_info.bw_len;