aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2018-04-22 20:22:46 +0300
committerZyX <kp-pav@yandex.ru>2018-04-22 20:22:46 +0300
commita90672fc3d571ce22711dd42b836faaddba0f76b (patch)
treebcdc85e773f025a8dbe74dcdb48a7ce6141f1665 /src
parent43df2edd20c8f7cfb96c6d0b61a0d2e34e921133 (diff)
downloadrneovim-a90672fc3d571ce22711dd42b836faaddba0f76b.tar.gz
rneovim-a90672fc3d571ce22711dd42b836faaddba0f76b.tar.bz2
rneovim-a90672fc3d571ce22711dd42b836faaddba0f76b.zip
undo: Silence PVS/V547: expression may be false on other system
Diffstat (limited to 'src')
-rw-r--r--src/nvim/undo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c
index 35857510fc..e1ae4b4cc0 100644
--- a/src/nvim/undo.c
+++ b/src/nvim/undo.c
@@ -972,7 +972,7 @@ static u_entry_T *unserialize_uep(bufinfo_T * bi, bool *error,
char_u **array = NULL;
if (uep->ue_size > 0) {
- if ((size_t)uep->ue_size < SIZE_MAX / sizeof(char_u *)) {
+ if ((size_t)uep->ue_size < SIZE_MAX / sizeof(char_u *)) { // -V547
array = xmalloc(sizeof(char_u *) * (size_t)uep->ue_size);
memset(array, 0, sizeof(char_u *) * (size_t)uep->ue_size);
}
@@ -1404,7 +1404,7 @@ void u_read_undo(char *name, char_u *hash, char_u *orig_name)
// sequence numbers of the headers.
// When there are no headers uhp_table is NULL.
if (num_head > 0) {
- if ((size_t)num_head < SIZE_MAX / sizeof(*uhp_table)) {
+ if ((size_t)num_head < SIZE_MAX / sizeof(*uhp_table)) { // -V547
uhp_table = xmalloc((size_t)num_head * sizeof(*uhp_table));
}
}