comparison src/ex_cmds2.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 57e81ce74c06
children 64e30831fa42
comparison
equal deleted inserted replaced
7008:7ce1f4e998bb 7009:286fd54c7ae3
3049 3049
3050 # ifdef HAVE_FD_CLOEXEC 3050 # ifdef HAVE_FD_CLOEXEC
3051 { 3051 {
3052 int fdflags = fcntl(fd_tmp, F_GETFD); 3052 int fdflags = fcntl(fd_tmp, F_GETFD);
3053 if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0) 3053 if (fdflags >= 0 && (fdflags & FD_CLOEXEC) == 0)
3054 fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC); 3054 (void)fcntl(fd_tmp, F_SETFD, fdflags | FD_CLOEXEC);
3055 } 3055 }
3056 # endif 3056 # endif
3057 3057
3058 return fdopen(fd_tmp, READBIN); 3058 return fdopen(fd_tmp, READBIN);
3059 } 3059 }
3839 si = &SCRIPT_ITEM(current_SID); 3839 si = &SCRIPT_ITEM(current_SID);
3840 if (si->sn_prof_on && sourcing_lnum >= 1) 3840 if (si->sn_prof_on && sourcing_lnum >= 1)
3841 { 3841 {
3842 /* Grow the array before starting the timer, so that the time spent 3842 /* Grow the array before starting the timer, so that the time spent
3843 * here isn't counted. */ 3843 * here isn't counted. */
3844 ga_grow(&si->sn_prl_ga, (int)(sourcing_lnum - si->sn_prl_ga.ga_len)); 3844 (void)ga_grow(&si->sn_prl_ga, (int)(sourcing_lnum - si->sn_prl_ga.ga_len));
3845 si->sn_prl_idx = sourcing_lnum - 1; 3845 si->sn_prl_idx = sourcing_lnum - 1;
3846 while (si->sn_prl_ga.ga_len <= si->sn_prl_idx 3846 while (si->sn_prl_ga.ga_len <= si->sn_prl_idx
3847 && si->sn_prl_ga.ga_len < si->sn_prl_ga.ga_maxlen) 3847 && si->sn_prl_ga.ga_len < si->sn_prl_ga.ga_maxlen)
3848 { 3848 {
3849 /* Zero counters for a line that was not used before. */ 3849 /* Zero counters for a line that was not used before. */