PVS-studio analysis results

www.viva64.com/en/w:1:1: error: Help: The documentation for all analyzer warnings is available here: https://www.viva64.com/en/w/.
/usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:62:1: warning: V677 Custom declaration of a standard 'size_t' type. The declaration from system header files should be used instead.
/usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:90:1: warning: V677 Custom declaration of a standard 'wchar_t' type. The declaration from system header files should be used instead.
/usr/local/clang-7.0.0/lib/clang/7.0.0/include/stdarg.h:30:1: warning: V677 Custom declaration of a standard 'va_list' type. The declaration from system header files should be used instead.
/usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:51:1: warning: V677 Custom declaration of a standard 'ptrdiff_t' type. The declaration from system header files should be used instead.
/usr/local/clang-7.0.0/lib/clang/7.0.0/include/stddef.h:132:1: warning: V677 Custom declaration of a standard 'wint_t' type. The declaration from system header files should be used instead.
./src/nvim/cursor.c:173:1: error: V1028 Possible overflow. Consider casting operands of the 'idx + correct' operator to the 'size_t' type, not the result.
./src/nvim/cursor.c:190:1: error: V1028 Possible overflow. Consider casting operands of the 'linelen - 1 + csize' operator to the 'size_t' type, not the result.
./src/nvim/cursor.c:390:1: warning: V560 A part of conditional expression is always true: win->w_cursor.coladd > 0.
./src/nvim/diff.c:699:1: warning: V547 Expression 'ptr == NULL' is always false.
./src/nvim/diff.c:1091:1: warning: V547 Expression 'cmd == NULL' is always false.
./src/nvim/diff.c:1547:1: error: V501 There are identical sub-expressions '(vim_fgets(linebuf, 50, fd) == 0)' to the left and to the right of the '&&' operator.
./src/nvim/diff.c:1568:1: error: V547 Expression 'diffstyle == DIFF_UNIFIED' is always true.
./src/nvim/eval.c:19895:1: error: V1028 Possible overflow. Consider casting operands of the 'j + 1' operator to the 'long' type, not the result.
./src/nvim/ex_cmds.c:4896:1: warning: V1032 The pointer '""' is cast to a more strictly aligned pointer type.
./src/nvim/ex_docmd.c:9361:1: error: V1028 Possible overflow. Consider casting operands of the 'wp->w_arg_idx + 1' operator to the 'int64_t' type, not the result.
./src/nvim/ex_docmd.c:9476:1: error: V1028 Possible overflow. Consider casting operands of the 'wp->w_virtcol + 1' operator to the 'int64_t' type, not the result.
./src/nvim/ex_docmd.c:9483:1: error: V1028 Possible overflow. Consider casting operands of the 'wp->w_virtcol + 1' operator to the 'int64_t' type, not the result.
./src/nvim/ex_getln.c:3374:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ex_getln.c:3636:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ex_getln.c:4679:1: warning: V1032 The pointer '""' is cast to a more strictly aligned pointer type.
./src/nvim/ex_getln.c:6169:1: warning: V547 Expression is always false.
./src/nvim/fileio.c:1384:1: warning: V1026 The 'u8c' variable is incremented in the loop. Undefined behavior will occur in case of signed integer overflow.
./src/nvim/fileio.c:1390:1: warning: V1026 The 'u8c' variable is incremented in the loop. Undefined behavior will occur in case of signed integer overflow.
./src/nvim/fileio.c:1391:1: warning: V1026 The 'u8c' variable is incremented in the loop. Undefined behavior will occur in case of signed integer overflow.
./src/nvim/garray.c:94:1: error: V1028 Possible overflow. Consider casting operands of the 'gap->ga_itemsize * new_maxlen' operator to the 'size_t' type, not the result.
./src/nvim/garray.c:95:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/getchar.c:909:1: error: V1028 Possible overflow. Consider casting operands of the 'typebuf.tb_len - offset + 1' operator to the 'size_t' type, not the result.
./src/nvim/getchar.c:1060:1: error: V1028 Possible overflow. Consider casting operands of the 'typebuf.tb_len - offset + 1' operator to the 'size_t' type, not the result.
./src/nvim/getchar.c:3976:1: warning: V560 A part of conditional expression is always false: mp->m_noremap == REMAP_SCRIPT.
./src/nvim/highlight.c:220:1: error: V1028 Possible overflow. Consider casting operands of the 'screen_Rows * screen_Columns' operator to the 'size_t' type, not the result.
./src/nvim/indent.c:207:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/indent.c:229:1: error: V1028 Possible overflow. Consider casting operands of the 'ind_len + line_len' operator to the 'size_t' type, not the result.
./src/nvim/indent.c:395:1: error: V1028 Possible overflow. Consider casting operands of the 'ind_len + line_len' operator to the 'size_t' type, not the result.
./src/nvim/indent.c:547:1: warning: V547 Expression 'inde_copy != NULL' is always true.
./src/nvim/misc1.c:498:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/misc1.c:1560:1: error: V1028 Possible overflow. Consider casting operands of the 'oldlen + newlen + 1' operator to the 'size_t' type, not the result.
./src/nvim/misc1.c:1564:1: error: V1028 Possible overflow. Consider casting operands of the 'oldlen - col + 1' operator to the 'size_t' type, not the result.
./src/nvim/normal.c:3320:1: error: V1028 Possible overflow. Consider casting operands of the 'rightcol - leftcol + 1' operator to the 'int64_t' type, not the result.
./src/nvim/normal.c:3961:1: warning: V1026 The 'curwin->w_curswant' variable is incremented in the loop. Undefined behavior will occur in case of signed integer overflow.
./src/nvim/normal.c:4962:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/normal.c:4965:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ops.c:378:1: error: V1028 Possible overflow. Consider casting operands of the 'bd.textcol + i + j + len' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:379:1: error: V1028 Possible overflow. Consider casting operands of the 'bd.textcol + i + j + len' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:1461:1: error: V1028 Possible overflow. Consider casting operands of the 'bd.startspaces + bd.endspaces' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:1720:1: error: V1028 Possible overflow. Consider casting operands of the 'bd.textcol + bd.startspaces' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:1749:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ops.c:1753:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ops.c:2584:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ops.c:3072:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/ops.c:3195:1: error: V1028 Possible overflow. Consider casting operands of the 'col + yanklen + 1' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:3199:1: error: V1028 Possible overflow. Consider casting operands of the 'yanklen + 1' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:3419:1: warning: V1019 Compound assignment expression 'n -= ptr2cells(p)' is used inside condition.
./src/nvim/ops.c:3694:1: error: V1028 Possible overflow. Consider casting operands of the 'sumsize + 1' operator to the 'size_t' type, not the result.
./src/nvim/ops.c:5451:1: error: V1028 Possible overflow. Consider casting operands of the 'curwin->w_cursor.col + 1' operator to the 'varnumber_T' type, not the result.
./src/nvim/ops.c:5470:1: error: V1028 Possible overflow. Consider casting operands, not the result.
./src/nvim/path.c:1270:1: warning: V1032 The pointer '""' is cast to a more strictly aligned pointer type.
./src/nvim/quickfix.c:4988:1: warning: V560 A part of conditional expression is always false: qi != save_qi.
./src/nvim/regexp.c:4289:1: warning: V560 A part of conditional expression is always true: status != 1.
./src/nvim/regexp.c:5173:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/regexp.c:5202:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/regexp.c:5230:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/regexp.c:5259:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/regexp.c:5289:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/regexp.c:5437:1: warning: V560 A part of conditional expression is always true: (((int) * (p))) <= 48 + 30.
./src/nvim/screen.c:3803:1: error: V547 Expression 'c == '\000'' is always true.
./src/nvim/screen.c:3831:1: warning: V560 A part of conditional expression is always true: c == '\000'.
./src/nvim/spell.c:4525:1: warning: V560 A part of conditional expression is always true: c2 != '\000'.
./src/nvim/spell.c:5308:1: error: V1028 Possible overflow. Consider casting operands of the 'sfwordnr + 1' operator to the 'linenr_T' type, not the result.
./src/nvim/tui/tui.c:681:1: error: V501 There are identical sub-expressions to the left and to the right of the '<' operator: col < col
./src/nvim/tui/tui.c:681:1: error: V654 The condition 'col < col' of loop is always false.
./src/nvim/tui/tui.c:1029:1: warning: V751 Parameter 'cols' is not used inside function body.
./src/nvim/ugrid.c:76:1: error: V1028 Possible overflow. Consider casting operands of the 'right - left + 1' operator to the 'size_t' type, not the result.
./src/nvim/viml/parser/expressions.c:2853:1: error: V547 Expression 'want_node == kENodeOperator' is always true.
./src/nvim/window.c:4345:1: warning: V547 Expression 'height > room + room_cmdline' is always true.