diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-08-11 19:14:00 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-08-11 19:14:00 +0200 |
commit | cde885473099296c4837de261833f48b24caf87c (patch) | |
tree | 7864f4147f9c3b57a77b649c7d14e8ad31cafa6c /src/if_cscope.c | |
parent | bd8539aac385d265d41da2e8ab59d7b9c3694557 (diff) | |
download | vim-git-cde885473099296c4837de261833f48b24caf87c.tar.gz |
patch 7.4.822v7.4.822
Problem: More problems reported by coverity.
Solution: Avoid the warnings. (Christian Brabandt)
Diffstat (limited to 'src/if_cscope.c')
-rw-r--r-- | src/if_cscope.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/if_cscope.c b/src/if_cscope.c index 2b4ba0813..4c3e2bd31 100644 --- a/src/if_cscope.c +++ b/src/if_cscope.c @@ -1076,8 +1076,8 @@ err_closing: /* * PRIVATE: cs_find * - * query cscope using command line interface. parse the output and use tselect - * to allow choices. like Nvi, creates a pipe to send to/from query/cscope. + * Query cscope using command line interface. Parse the output and use tselect + * to allow choices. Like Nvi, creates a pipe to send to/from query/cscope. * * returns TRUE if we jump to a tag or abort, FALSE if not. */ @@ -1214,7 +1214,10 @@ cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline) nummatches = (int *)alloc(sizeof(int)*csinfo_size); if (nummatches == NULL) + { + vim_free(cmd); return FALSE; + } /* Send query to all open connections, then count the total number * of matches so we can alloc all in one swell foop. */ @@ -1289,7 +1292,7 @@ cs_find_common(opt, pat, forceit, verbose, use_ll, cmdline) # ifdef FEAT_WINDOWS if (postponed_split != 0) { - win_split(postponed_split > 0 ? postponed_split : 0, + (void)win_split(postponed_split > 0 ? postponed_split : 0, postponed_split_flags); RESET_BINDING(curwin); postponed_split = 0; @@ -2085,6 +2088,8 @@ cs_print_tags_priv(matches, cntxts, num_matches) strcpy(tbuf, matches[0]); ptag = strtok(tbuf, "\t"); + if (ptag == NULL) + return; newsize = (int)(strlen(cstag_msg) + strlen(ptag)); buf = (char *)alloc(newsize); |