fix(PVS V681): function call order is undefined

https://pvs-studio.com/en/docs/warnings/v681/
This commit is contained in:
Justin M. Keyes 2021-09-24 02:49:59 -07:00
parent fefd1652e7
commit 3c7cef7b08

View File

@ -3112,12 +3112,13 @@ void fileinfo(int fullname, // when non-zero print full path
(size_t)(IOSIZE - (p - buffer)), true); (size_t)(IOSIZE - (p - buffer)), true);
} }
bool dontwrite = bt_dontwrite(curbuf);
vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s", vim_snprintf_add((char *)buffer, IOSIZE, "\"%s%s%s%s%s%s",
curbufIsChanged() curbufIsChanged()
? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ", ? (shortmess(SHM_MOD) ? " [+]" : _(" [Modified]")) : " ",
(curbuf->b_flags & BF_NOTEDITED) && !bt_dontwrite(curbuf) (curbuf->b_flags & BF_NOTEDITED) && !dontwrite
? _("[Not edited]") : "", ? _("[Not edited]") : "",
(curbuf->b_flags & BF_NEW) && !bt_dontwrite(curbuf) (curbuf->b_flags & BF_NEW) && !dontwrite
? new_file_message() : "", ? new_file_message() : "",
(curbuf->b_flags & BF_READERR) (curbuf->b_flags & BF_READERR)
? _("[Read errors]") : "", ? _("[Read errors]") : "",