Commit Graph

10615 Commits

Author SHA1 Message Date
ZyX
4b41680828 window: Fix PVS/V547: expression already checked in previous if() 2018-04-22 20:25:44 +03:00
ZyX
c8648daab3 window: Silence PVS/V547: height may be changed by curwin ptr 2018-04-22 20:24:57 +03:00
ZyX
d9c010e45d api/vim: Fix PVS/V547: node was already dereferenced, so can’t be NULL 2018-04-22 20:23:50 +03:00
ZyX
a90672fc3d undo: Silence PVS/V547: expression may be false on other system 2018-04-22 20:22:46 +03:00
ZyX
43df2edd20 ui_bridge: Silence PVS/V547: assuming stopped may be changed via ptr 2018-04-22 20:21:55 +03:00
ZyX
6c2b442ee0 eval/typval: Silence PVS/V576: format is correct 2018-04-22 20:20:53 +03:00
ZyX
f50670aeff ugrid: Silence PVS/V625: UGRID_FOREACH_CELL may be used for one row 2018-04-22 20:18:29 +03:00
ZyX
f9b728e2f8 tui: Silence PVS/V560: condition is set to true in prev-previous if() 2018-04-22 20:16:58 +03:00
ZyX
9da2e7b021 syntax: Fix PVS/V560: condition was checked in previous if(), breaking 2018-04-22 20:15:42 +03:00
ZyX
3f4ec1aed2 syntax: Fix PVS/V547: condition was checked
In surrounding if() `off` was checked for being non-zero and in previous if() it
was checked for being positive.
2018-04-22 20:15:42 +03:00
ZyX
e724667ef4 syntax: Silence PVS/V560: condition is always true at that point 2018-04-22 20:12:23 +03:00
ZyX
2a951d16a4 syntax: Silence PVS/V522: retval is always non-NULL on this round 2018-04-22 20:08:49 +03:00
ZyX
5ba267722c syntax: Fix PVS/V560: condition checked in previous if() 2018-04-22 20:06:35 +03:00
ZyX
0eaecbaf47 strings: Fix PVS/V547: condition already checked by surrounding if 2018-04-22 20:05:32 +03:00
ZyX
b9b17a58da strings: Fix PVS/V779: wrong assert() position 2018-04-22 20:03:48 +03:00
ZyX
fb0c35105f spellfile: Silence PVS/V547: expression may be true on other systems 2018-04-22 20:02:50 +03:00
ZyX
f45df71081 spellfile: Fix PVS/V547: allocator never returns NULL now 2018-04-22 20:02:50 +03:00
ZyX
0ba2ec0bae spellfile: Fix PVS/V560: allocator never returns NULL now 2018-04-22 19:54:40 +03:00
ZyX
60577eeaf5 spell: Fix PVS/V512: use of sprintf() 2018-04-22 19:53:06 +03:00
ZyX
9f3e67a814 search: Fix PVS/V547: allocator never returns NULL now 2018-04-22 19:50:13 +03:00
ZyX
2cdf9d1388 search: Fix PVS/V560: condition checked in previous if with goto 2018-04-22 19:47:45 +03:00
ZyX
db1c9b625c search: Fix PVS/V547: condition already checked in surrounding if 2018-04-22 19:46:27 +03:00
ZyX
b144a77f38 search: Fix PVS/V547: checking variable right after assigning it 2018-04-22 19:44:56 +03:00
ZyX
3c7cc03f34 screen: Fix PVS/V560: col never reassigned in this part of code 2018-04-22 19:43:27 +03:00
ZyX
4ff4e66fd7 screen: Fix PVS/V519: duplicate successive assignment 2018-04-22 19:40:47 +03:00
ZyX
9c981f5a19 screen: Fix PVS/V560: condition was checked in surrounding if 2018-04-22 19:39:39 +03:00
ZyX
e3bffa47a6 globals: Do not use false for enc_dbcs
Based on screen.c code this value is not a boolean, so `false` is not 
appropriate. It should be either 0 or one of DBCS_… values.
2018-04-22 19:33:46 +03:00
ZyX
d42f934bcb screen: Get rid of ScreenLines2 as it is no longer used
Should also fix some PVS warnings in process.
2018-04-22 19:32:17 +03:00
ZyX
adfc1212b5 regexp_nfa: Silence PVS/V560: current code is more obvious
While warning is technically true (cannot enter this case with `state->c` 
greater then NFA_Z…9) it makes condition less readable and relies on knownledge 
of enum internal structure.
2018-04-22 19:09:20 +03:00
ZyX
190cc43cf3 quickfix: Silence PVS/V560: memory is referenced and may be changed 2018-04-22 18:59:23 +03:00
ZyX
3ee187b770 quickfix: Fix PVS/V547: allocator never returns NULL now 2018-04-22 18:57:34 +03:00
ZyX
4d43ce85f1 quickfix: Fix PVS/V547,V560: no conversion with fixed &encoding 2018-04-22 18:54:52 +03:00
ZyX
b7a46f2299 eval/typval: Remove struct dictitem_S which is not used anywhere 2018-04-20 00:04:25 +03:00
ZyX
8cdaac0d80 event/process: Silence PVS/V547: assuming stream->num_bytes changes
Not familiar with the code, but I assume that loop_poll_events can actually 
change stream->num_bytes, so condition is not always false.
2018-04-17 01:49:46 +03:00
ZyX
cb3bb0becb pvscheck: Add --update switch 2018-04-17 01:44:11 +03:00
ZyX
57c66bc168 pvscheck: Remove outputs before running plog-converter
plog-converter behaviour is not the best one when creating fullhtml report and
directory already exists: it puts report inside an existing directory. Not sure
what exactly it does if inside exists as well, but if I am not mistaking report
will not be created.
2018-04-17 01:37:58 +03:00
ZyX
eba61fbc97 path: Silence PVS/V557: impossible to reach with NUL-terminated string 2018-04-17 01:36:18 +03:00
ZyX
4a1251206a path: Fix PVS/V560: condition is essentially A && A 2018-04-17 01:07:16 +03:00
ZyX
fab09ea0d6 option: Silence PVS/V547: expression is true on 64-bit systems 2018-04-16 11:37:39 +03:00
ZyX
d0850586df option: Fix PVS/V547: var is always NULL at that point 2018-04-16 11:36:06 +03:00
ZyX
6a5b9de546 option: Fix PVS/V560: EXPAND_BOOL_SETTINGS already caused early return 2018-04-16 11:34:26 +03:00
ZyX
61b6eb926d option: Fix PVS/V547: allocator never returns NULL now 2018-04-16 11:33:11 +03:00
ZyX
d66217ab6d option: Fix PVS/V517: duplicate check for titlelen 2018-04-16 11:32:00 +03:00
ZyX
0eb1d7ca4c option: Silence PVS/V594: GLOBAL_WO macros is not really necessary
In that case it is completely possible to just use w_allbuf_opt directly.
2018-04-16 11:31:27 +03:00
ZyX
95cc2507c9 ops: Fix PVS/V560: pre may not be zero as that was already checked 2018-04-16 11:23:22 +03:00
ZyX
fc1ebb060e ops: Fix PVS/V614: use of uninitialized variable
I have actually no idea how code managed to work and not trigger ASAN/etc here. 
It does not look like a false positive at all.
2018-04-15 21:49:47 +03:00
ZyX
dae1975394 ops: Fix PVS/V547: allocator never returns NULL 2018-04-15 21:46:32 +03:00
ZyX
2b7a8ceeb6 ops: Fix PVS/V547: did_change is almost always set
Only exception is early `goto theend`.
2018-04-15 21:44:36 +03:00
ZyX
4a145f2036 ops: Silence PVS/V614: regtype is always initialized 2018-04-15 21:40:30 +03:00
ZyX
3b32e717d9 message: Fix PVS/V547: c is never equal to KS_ZERO
Since `c` there is a result of evaluating `TO_SPECIAL` macros it may be only one 
of the following three things:

1. K_SPECIAL
2. K_ZERO (note: not KS_ZERO)
3. negative integer resulting from evaluating TERMCAP2KEY macro.

All variants here are negative and thus fail next !IS_SPECIAL(c) check (negative 
is special). If `c` was really NUL it would fall into the `!IS_SPECIAL(c)` block 
and use whatever character is third in `<80>{a}{b}` combo. For `<Nul>` it is 
X (`<80><ff>X`).
2018-04-15 21:32:26 +03:00