Merge #10969 from janlazo/clang_pvs

This commit is contained in:
Justin M. Keyes 2019-09-10 20:15:44 -07:00 committed by GitHub
commit b735583377
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -118,7 +118,6 @@ char_u *parse_shape_opt(int what)
// Repeat for all modes before the colon. // Repeat for all modes before the colon.
// For the 'a' mode, we loop to handle all the modes. // For the 'a' mode, we loop to handle all the modes.
all_idx = -1; all_idx = -1;
assert(modep < colonp);
while (modep < colonp || all_idx >= 0) { while (modep < colonp || all_idx >= 0) {
if (all_idx < 0) { if (all_idx < 0) {
// Find the mode // Find the mode
@ -230,8 +229,9 @@ char_u *parse_shape_opt(int what)
} }
} }
modep = p; modep = p;
if (*modep == ',') if (modep != NULL && *modep == ',') {
++modep; modep++;
}
} }
} }

View File

@ -5139,9 +5139,7 @@ static int qf_setprop_context(qf_info_T *qi, int qf_idx, dictitem_T *di)
{ {
tv_free(qi->qf_lists[qf_idx].qf_ctx); tv_free(qi->qf_lists[qf_idx].qf_ctx);
typval_T *ctx = xcalloc(1, sizeof(typval_T)); typval_T *ctx = xcalloc(1, sizeof(typval_T));
if (ctx != NULL) { tv_copy(&di->di_tv, ctx);
tv_copy(&di->di_tv, ctx);
}
qi->qf_lists[qf_idx].qf_ctx = ctx; qi->qf_lists[qf_idx].qf_ctx = ctx;
return OK; return OK;

View File

@ -5522,6 +5522,7 @@ do_class:
* there is an error. * there is an error.
*/ */
static char_u *regnext(char_u *p) static char_u *regnext(char_u *p)
FUNC_ATTR_NONNULL_ALL
{ {
int offset; int offset;

View File

@ -2305,6 +2305,7 @@ static int find_region(char_u *rp, char_u *region)
/// ///
/// @returns Case type of word /// @returns Case type of word
int captype(char_u *word, char_u *end) int captype(char_u *word, char_u *end)
FUNC_ATTR_NONNULL_ARG(1)
{ {
char_u *p; char_u *p;
int c; int c;
@ -2355,6 +2356,7 @@ int captype(char_u *word, char_u *end)
// capital. So that make_case_word() can turn WOrd into Word. // capital. So that make_case_word() can turn WOrd into Word.
// Add ALLCAP for "WOrD". // Add ALLCAP for "WOrD".
static int badword_captype(char_u *word, char_u *end) static int badword_captype(char_u *word, char_u *end)
FUNC_ATTR_NONNULL_ALL
{ {
int flags = captype(word, end); int flags = captype(word, end);
int c; int c;