Mercurial > vim
comparison src/eval.c @ 7009:286fd54c7ae3 v7.4.822
patch 7.4.822
Problem: More problems reported by coverity.
Solution: Avoid the warnings. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Aug 2015 19:14:00 +0200 |
parents | cdd862e0f896 |
children | 962b3ae252a9 |
comparison
equal
deleted
inserted
replaced
7008:7ce1f4e998bb | 7009:286fd54c7ae3 |
---|---|
6734 return FAIL; | 6734 return FAIL; |
6735 | 6735 |
6736 len = (int)STRLEN(s); | 6736 len = (int)STRLEN(s); |
6737 sumlen += len; | 6737 sumlen += len; |
6738 | 6738 |
6739 ga_grow(join_gap, 1); | 6739 (void)ga_grow(join_gap, 1); |
6740 p = ((join_T *)join_gap->ga_data) + (join_gap->ga_len++); | 6740 p = ((join_T *)join_gap->ga_data) + (join_gap->ga_len++); |
6741 if (tofree != NULL || s != numbuf) | 6741 if (tofree != NULL || s != numbuf) |
6742 { | 6742 { |
6743 p->s = s; | 6743 p->s = s; |
6744 p->tofree = tofree; | 6744 p->tofree = tofree; |
19588 } | 19588 } |
19589 if (idx != 0) | 19589 if (idx != 0) |
19590 goto error; | 19590 goto error; |
19591 } | 19591 } |
19592 | 19592 |
19593 ga_grow(&ga, cplen); | 19593 (void)ga_grow(&ga, cplen); |
19594 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen); | 19594 mch_memmove((char *)ga.ga_data + ga.ga_len, cpstr, (size_t)cplen); |
19595 ga.ga_len += cplen; | 19595 ga.ga_len += cplen; |
19596 | 19596 |
19597 in_str += inlen; | 19597 in_str += inlen; |
19598 } | 19598 } |
19608 ++in_str; | 19608 ++in_str; |
19609 } | 19609 } |
19610 } | 19610 } |
19611 | 19611 |
19612 /* add a terminating NUL */ | 19612 /* add a terminating NUL */ |
19613 ga_grow(&ga, 1); | 19613 (void)ga_grow(&ga, 1); |
19614 ga_append(&ga, NUL); | 19614 ga_append(&ga, NUL); |
19615 | 19615 |
19616 rettv->vval.v_string = ga.ga_data; | 19616 rettv->vval.v_string = ga.ga_data; |
19617 } | 19617 } |
19618 | 19618 |