Merge #6550 from ZyX-I/pvs-check-comment

This commit is contained in:
Justin M. Keyes 2017-04-20 22:00:03 +02:00 committed by GitHub
commit 15af803cce
114 changed files with 379 additions and 15 deletions

View File

@ -12,20 +12,28 @@ help() {
echo 'Usage:' echo 'Usage:'
echo ' pvscheck.sh [target-directory [branch]]' echo ' pvscheck.sh [target-directory [branch]]'
echo ' pvscheck.sh [--recheck] [target-directory]' echo ' pvscheck.sh [--recheck] [target-directory]'
echo ' pvscheck.sh --patch [--only-build]'
echo echo
echo ' --recheck: run analysis on a prepared target directory' echo ' --patch: patch sources in the current directory.'
echo ' Does not patch already patched files.'
echo ' Does not run analysis.'
echo echo
echo ' target-directory: Directory where build should occur' echo ' --only-build: Only patch files in ./build directory.'
echo
echo ' --recheck: run analysis on a prepared target directory.'
echo
echo ' target-directory: Directory where build should occur.'
echo ' Default: ../neovim-pvs' echo ' Default: ../neovim-pvs'
echo echo
echo ' branch: Branch to check' echo ' branch: Branch to check.'
echo ' Default: master' echo ' Default: master.'
} }
get_pvs_comment() { get_pvs_comment() {
cat > pvs-comment << EOF cat > pvs-comment << EOF
// This is an open source non-commercial project. Dear PVS-Studio, please check it. // This is an open source non-commercial project. Dear PVS-Studio, please check
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com // it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
EOF EOF
} }
@ -62,19 +70,27 @@ patch_sources() {
get_pvs_comment get_pvs_comment
local sh_script=' local sh_script='
cat pvs-comment "$1" > "$1.tmp" pvs_comment="$(cat pvs-comment ; echo -n EOS)"
mv "$1.tmp" "$1" filehead="$(head -c $(( ${#pvs_comment} - 3 )) "$1" ; echo -n EOS)"
if test "x$filehead" != "x$pvs_comment" ; then
cat pvs-comment "$1" > "$1.tmp"
mv "$1.tmp" "$1"
fi
' '
find \ if test "x$1" != "x--only-build" ; then
src/nvim test/functional/fixtures test/unit/fixtures \ find \
-name '*.[ch]' \ src/nvim test/functional/fixtures test/unit/fixtures \
-exec /bin/sh -c "$sh_script" - '{}' \; -name '*.c' \
-exec /bin/sh -c "$sh_script" - '{}' \;
fi
find \ find \
build/src/nvim/auto build/config \ build/src/nvim/auto build/config \
-name '*.[ch]' -not -name '*.test-include.c' \ -name '*.c' -not -name '*.test-include.c' \
-exec /bin/sh -c "$sh_script" - '{}' \; -exec /bin/sh -c "$sh_script" - '{}' \;
rm pvs-comment
} }
run_analysis() { run_analysis() {
@ -103,8 +119,6 @@ do_check() {
create_compile_commands create_compile_commands
patch_sources
run_analysis run_analysis
} }
@ -128,6 +142,17 @@ main() {
set -x set -x
if test "x$1" = "x--patch" ; then
shift
if test "x$1" = "x--only-build" ; then
shift
patch_sources --only-build
else
patch_sources
fi
exit $?
fi
local recheck= local recheck=
if test "x$1" = "x--recheck" ; then if test "x$1" = "x--recheck" ; then
recheck=1 recheck=1

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Much of this code was adapted from 'if_py_both.h' from the original // Much of this code was adapted from 'if_py_both.h' from the original
// vim source // vim source
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stddef.h> #include <stddef.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <inttypes.h> #include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file arabic.c /// @file arabic.c
/// ///
/// Functions for Arabic language. /// Functions for Arabic language.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* buffer.c: functions for dealing with the buffer structure * buffer.c: functions for dealing with the buffer structure
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file charset.c /// @file charset.c
/// ///
/// Code related to character sets. /// Code related to character sets.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include <inttypes.h> #include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include "nvim/vim.h" #include "nvim/vim.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file diff.c /// @file diff.c
/// ///
/// Code for diff'ing two, three or four buffers. /// Code for diff'ing two, three or four buffers.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file digraph.c /// @file digraph.c
/// ///
/// code for digraphs /// code for digraphs

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* edit.c: functions for Insert mode * edit.c: functions for Insert mode
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* eval.c: Expression evaluation. * eval.c: Expression evaluation.
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stddef.h> #include <stddef.h>
#include <msgpack.h> #include <msgpack.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file encode.c /// @file encode.c
/// ///
/// File containing functions for encoding and decoding VimL values. /// File containing functions for encoding and decoding VimL values.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include "nvim/eval/typval.h" #include "nvim/eval/typval.h"
#include "nvim/eval/executor.h" #include "nvim/eval/executor.h"
#include "nvim/eval.h" #include "nvim/eval.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include "nvim/eval/typval.h" #include "nvim/eval/typval.h"
#include "nvim/eval/gc.h" #include "nvim/eval/gc.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdio.h> #include <stdio.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <uv.h> #include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdarg.h> #include <stdarg.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Multi-level queue for selective async event processing. // Multi-level queue for selective async event processing.
// Not threadsafe; access must be synchronized externally. // Not threadsafe; access must be synchronized externally.
// //

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <uv.h> #include <uv.h>
#include "nvim/event/loop.h" #include "nvim/event/loop.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdint.h> #include <stdint.h>
#include <uv.h> #include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* ex_cmds.c: some functions for command line commands * ex_cmds.c: some functions for command line commands
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file ex_cmds2.c /// @file ex_cmds2.c
/// ///
/// Some more functions for command line commands /// Some more functions for command line commands

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* ex_docmd.c: functions for executing an Ex command line. * ex_docmd.c: functions for executing an Ex command line.
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// TODO(ZyX-I): move to eval/executor // TODO(ZyX-I): move to eval/executor
/// @file ex_eval.c /// @file ex_eval.c

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* ex_getln.c: Functions for entering and editing an Ex command line. * ex_getln.c: Functions for entering and editing an Ex command line.
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file farsi.c /// @file farsi.c
/// ///
/// Functions for Farsi language /// Functions for Farsi language

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// File searching functions for 'path', 'tags' and 'cdpath' options. // File searching functions for 'path', 'tags' and 'cdpath' options.
// //
// External visible functions: // External visible functions:

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* fileio.c: read from and write to a file * fileio.c: read from and write to a file
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// vim: set fdm=marker fdl=1 fdc=3 // vim: set fdm=marker fdl=1 fdc=3
/* /*

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file garray.c /// @file garray.c
/// ///
/// Functions for handling growing arrays. /// Functions for handling growing arrays.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* getchar.c * getchar.c
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* hardcopy.c: printing to paper * hardcopy.c: printing to paper
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file hashtab.c /// @file hashtab.c
/// ///
/// Handling of a hashtable with Vim-specific properties. /// Handling of a hashtable with Vim-specific properties.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com> * CSCOPE support for Vim added by Andy Kahn <kahn@zk3.dec.com>
* Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com> * Ported to Win32 by Sergey Khorev <sergey.khorev@gmail.com>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <limits.h> #include <limits.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdarg.h> #include <stdarg.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#define EXTERN #define EXTERN
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdlib.h> #include <stdlib.h>
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* mark.c: functions for setting marks and jumping to them * mark.c: functions for setting marks and jumping to them
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// mbyte.c: Code specifically for handling multi-byte characters. /// mbyte.c: Code specifically for handling multi-byte characters.
/// Multibyte extensions partly by Sung-Hoon Baek /// Multibyte extensions partly by Sung-Hoon Baek
/// ///

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// An abstraction to handle blocks of memory which can be stored in a file. /// An abstraction to handle blocks of memory which can be stored in a file.
/// This is the implementation of a sort of virtual memory. /// This is the implementation of a sort of virtual memory.
/// ///

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* for debugging */ /* for debugging */
/* #define CHECK(c, s) if (c) EMSG(s) */ /* #define CHECK(c, s) if (c) EMSG(s) */
#define CHECK(c, s) #define CHECK(c, s)

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Various routines dealing with allocation and deallocation of memory. // Various routines dealing with allocation and deallocation of memory.
#include <assert.h> #include <assert.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* Code for menus. Used for the GUI and 'wildmenu'. * Code for menus. Used for the GUI and 'wildmenu'.
* GUI/Motif support by Robert Webb * GUI/Motif support by Robert Webb

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* message.c: functions for displaying messages on the command line * message.c: functions for displaying messages on the command line
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* misc1.c: functions that didn't seem to fit elsewhere * misc1.c: functions that didn't seem to fit elsewhere
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include "nvim/mouse.h" #include "nvim/mouse.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* move.c: Functions for moving the cursor and scrolling text. * move.c: Functions for moving the cursor and scrolling text.
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include <string.h> #include <string.h>
#include <inttypes.h> #include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include <inttypes.h> #include <inttypes.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* normal.c: Contains the main routine for processing characters in command * normal.c: Contains the main routine for processing characters in command
* mode. Communicates closely with the code in ops.c to handle * mode. Communicates closely with the code in ops.c to handle

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* ops.c: implementation of various operators: op_shift, op_delete, op_tilde, * ops.c: implementation of various operators: op_shift, op_delete, op_tilde,
* op_change, op_yank, do_put, do_join * op_change, op_yank, do_put, do_join

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// User-settable options. Checklist for adding a new option: // User-settable options. Checklist for adding a new option:
// - Put it in options.lua // - Put it in options.lua
// - For a global option: Add a variable for it in option_defs.h. // - For a global option: Add a variable for it in option_defs.h.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// Functions for using external native libraries /// Functions for using external native libraries
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Environment inspection // Environment inspection
#include <assert.h> #include <assert.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file fileio.c /// @file fileio.c
/// ///
/// Buffered reading/writing to a file. Unlike fileio.c this is not dealing with /// Buffered reading/writing to a file. Unlike fileio.c this is not dealing with

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// fs.c -- filesystem access // fs.c -- filesystem access
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <string.h> #include <string.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// Functions for accessing system memory information. /// Functions for accessing system memory information.
#include <uv.h> #include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// Some of the code came from pangoterm and libuv // Some of the code came from pangoterm and libuv
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <string.h> #include <string.h>
#include <assert.h> #include <assert.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdbool.h> #include <stdbool.h>
#include "nvim/os/stdpaths_defs.h" #include "nvim/os/stdpaths_defs.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// users.c -- operating system user information // users.c -- operating system user information
#include <uv.h> #include <uv.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...) * os_unix.c -- code for all flavors of Unix (BSD, SYSV, SVR4, POSIX, ...)
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <inttypes.h> #include <inttypes.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file popupmnu.c /// @file popupmnu.c
/// ///
/// Popup menu (PUM) /// Popup menu (PUM)

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdio.h> #include <stdio.h>
#include <math.h> #include <math.h>
#include <assert.h> #include <assert.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* quickfix.c: functions for quickfix mode, using a file with error messages * quickfix.c: functions for quickfix mode, using a file with error messages
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* Handling of regular expressions: vim_regcomp(), vim_regexec(), vim_regsub() * Handling of regular expressions: vim_regcomp(), vim_regexec(), vim_regsub()
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* NFA regular expression implementation. * NFA regular expression implementation.
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* screen.c: code for displaying on the screen * screen.c: code for displaying on the screen
* *

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* search.c: code for normal mode searching commands * search.c: code for normal mode searching commands
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/// @file sha256.c /// @file sha256.c
/// ///
/// FIPS-180-2 compliant SHA-256 implementation /// FIPS-180-2 compliant SHA-256 implementation

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <stdlib.h> #include <stdlib.h>
#include <stddef.h> #include <stddef.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// spell.c: code for spell checking // spell.c: code for spell checking
// //
// See spellfile.c for the Vim spell file format. // See spellfile.c for the Vim spell file format.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// spellfile.c: code for reading and writing spell files. // spellfile.c: code for reading and writing spell files.
// //
// See spell.c for information about spell checking. // See spell.c for information about spell checking.

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h> #include <assert.h>
#include "nvim/lib/kvec.h" #include "nvim/lib/kvec.h"

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <inttypes.h> #include <inttypes.h>
#include <stdarg.h> #include <stdarg.h>
#include <stdbool.h> #include <stdbool.h>

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* syntax.c: code for syntax highlighting * syntax.c: code for syntax highlighting
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* /*
* Code to handle tags and the tag stack * Code to handle tags and the tag stack
*/ */

View File

@ -1,3 +1,6 @@
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
// VT220/xterm-like terminal emulator. // VT220/xterm-like terminal emulator.
// Powered by libvterm http://www.leonerd.org.uk/code/libvterm // Powered by libvterm http://www.leonerd.org.uk/code/libvterm
// //

Some files were not shown because too many files have changed in this diff Show More