Merge #9518 from justinmk/pvs-warnings

This commit is contained in:
Justin M. Keyes 2019-01-18 21:51:32 +01:00 committed by GitHub
commit 8a5c68f695
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -374,7 +374,7 @@ run_analysis() {(
--sourcetree-root . || true
rm -rf PVS-studio.{xml,err,tsk,html.d}
local plog_args="PVS-studio.log --srcRoot . --excludedCodes V011"
local plog_args="PVS-studio.log --srcRoot . --excludedCodes V011 --exclude-path stddef.h --exclude-path stdarg.h"
plog-converter $plog_args --renderTypes xml --output PVS-studio.xml
plog-converter $plog_args --renderTypes errorfile --output PVS-studio.err
plog-converter $plog_args --renderTypes tasklist --output PVS-studio.tsk

View File

@ -2039,6 +2039,7 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files,
char_u *ffname;
// check all files in (*files)[]
assert(*num_files == 0 || *files != NULL);
for (i = 0; i < *num_files; i++) {
ffname = (char_u *)FullName_save((char *)(*files)[i], false);
assert((*files)[i] != NULL);
@ -2056,16 +2057,16 @@ int expand_wildcards(int num_pat, char_u **pat, int *num_files, char_u ***files,
}
}
/*
* Move the names where 'suffixes' match to the end.
*/
//
// Move the names where 'suffixes' match to the end.
//
assert(*num_files == 0 || *files != NULL);
if (*num_files > 1) {
non_suf_match = 0;
for (i = 0; i < *num_files; i++) {
if (!match_suffix((*files)[i])) {
//
// Move the name without matching suffix to the front
// of the list.
// Move the name without matching suffix to the front of the list.
//
p = (*files)[i];
for (j = i; j > non_suf_match; j--) {

View File

@ -230,6 +230,7 @@
#define UPPER 47 /* Match uppercase char */
#define NUPPER 48 /* Match non-uppercase char */
#define LAST_NL NUPPER + ADD_NL
// -V:WITH_NL:560
#define WITH_NL(op) ((op) >= FIRST_NL && (op) <= LAST_NL)
#define MOPEN 80 // -89 Mark this point in input as start of