comparison src/getchar.c @ 13762:9de2b25932eb v8.0.1753

patch 8.0.1753: various warnings from a static analyser commit https://github.com/vim/vim/commit/1c17ffa4611f4efe68c61f7cdd9ed692a866ba75 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Apr 24 15:19:04 2018 +0200 patch 8.0.1753: various warnings from a static analyser Problem: Various warnings from a static analyser Solution: Add type casts, remove unneeded conditions. (Christian Brabandt, closes #2770)
author Christian Brabandt <cb@256bit.org>
date Tue, 24 Apr 2018 15:30:08 +0200
parents d35b1702a1da
children 044337cbf854
comparison
equal deleted inserted replaced
13761:ddd0ad66922b 13762:9de2b25932eb
4117 map_to_exists_mode(char_u *rhs, int mode, int abbr) 4117 map_to_exists_mode(char_u *rhs, int mode, int abbr)
4118 { 4118 {
4119 mapblock_T *mp; 4119 mapblock_T *mp;
4120 int hash; 4120 int hash;
4121 # ifdef FEAT_LOCALMAP 4121 # ifdef FEAT_LOCALMAP
4122 int expand_buffer = FALSE; 4122 int exp_buffer = FALSE;
4123 4123
4124 validate_maphash(); 4124 validate_maphash();
4125 4125
4126 /* Do it twice: once for global maps and once for local maps. */ 4126 /* Do it twice: once for global maps and once for local maps. */
4127 for (;;) 4127 for (;;)
4132 if (abbr) 4132 if (abbr)
4133 { 4133 {
4134 if (hash > 0) /* there is only one abbr list */ 4134 if (hash > 0) /* there is only one abbr list */
4135 break; 4135 break;
4136 #ifdef FEAT_LOCALMAP 4136 #ifdef FEAT_LOCALMAP
4137 if (expand_buffer) 4137 if (exp_buffer)
4138 mp = curbuf->b_first_abbr; 4138 mp = curbuf->b_first_abbr;
4139 else 4139 else
4140 #endif 4140 #endif
4141 mp = first_abbr; 4141 mp = first_abbr;
4142 } 4142 }
4143 # ifdef FEAT_LOCALMAP 4143 # ifdef FEAT_LOCALMAP
4144 else if (expand_buffer) 4144 else if (exp_buffer)
4145 mp = curbuf->b_maphash[hash]; 4145 mp = curbuf->b_maphash[hash];
4146 # endif 4146 # endif
4147 else 4147 else
4148 mp = maphash[hash]; 4148 mp = maphash[hash];
4149 for (; mp; mp = mp->m_next) 4149 for (; mp; mp = mp->m_next)
4152 && strstr((char *)mp->m_str, (char *)rhs) != NULL) 4152 && strstr((char *)mp->m_str, (char *)rhs) != NULL)
4153 return TRUE; 4153 return TRUE;
4154 } 4154 }
4155 } 4155 }
4156 # ifdef FEAT_LOCALMAP 4156 # ifdef FEAT_LOCALMAP
4157 if (expand_buffer) 4157 if (exp_buffer)
4158 break; 4158 break;
4159 expand_buffer = TRUE; 4159 exp_buffer = TRUE;
4160 } 4160 }
4161 # endif 4161 # endif
4162 4162
4163 return FALSE; 4163 return FALSE;
4164 } 4164 }