comparison src/scriptfile.c @ 21497:766839794e09 v8.2.1299

patch 8.2.1299: compiler warning for using size_t for int and void pointer Commit: https://github.com/vim/vim/commit/d3bb6a82a51d549bbd597bb4e94d8f074009be2a Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 26 15:55:25 2020 +0200 patch 8.2.1299: compiler warning for using size_t for int and void pointer Problem: Compiler warning for using size_t for int and void pointer. Solution: Add type casts.
author Bram Moolenaar <Bram@vim.org>
date Sun, 26 Jul 2020 16:00:06 +0200
parents 4c1a929fde80
children 6c477989f9a4
comparison
equal deleted inserted replaced
21496:a0de640b35da 21497:766839794e09
155 default: type_name = ""; break; 155 default: type_name = ""; break;
156 } 156 }
157 last_type = entry->es_type; 157 last_type = entry->es_type;
158 } 158 }
159 len += STRLEN(type_name); 159 len += STRLEN(type_name);
160 if (ga_grow(&ga, len) == FAIL) 160 if (ga_grow(&ga, (int)len) == FAIL)
161 break; 161 break;
162 if (idx == exestack.ga_len - 1 || entry->es_lnum == 0) 162 if (idx == exestack.ga_len - 1 || entry->es_lnum == 0)
163 // For the bottom entry: do not add the line number, it is used 163 // For the bottom entry: do not add the line number, it is used
164 // in <slnum>. Also leave it out when the number is not set. 164 // in <slnum>. Also leave it out when the number is not set.
165 vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s%s", 165 vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s%s",
166 type_name, entry->es_name, 166 type_name, entry->es_name,
167 idx == exestack.ga_len - 1 ? "" : ".."); 167 idx == exestack.ga_len - 1 ? "" : "..");
168 else 168 else
169 vim_snprintf(ga.ga_data + ga.ga_len, len, "%s%s[%ld]..", 169 vim_snprintf((char *)ga.ga_data + ga.ga_len, len, "%s%s[%ld]..",
170 type_name, entry->es_name, entry->es_lnum); 170 type_name, entry->es_name, entry->es_lnum);
171 ga.ga_len += STRLEN(ga.ga_data + ga.ga_len); 171 ga.ga_len += (int)STRLEN((char *)ga.ga_data + ga.ga_len);
172 } 172 }
173 } 173 }
174 174
175 return (char_u *)ga.ga_data; 175 return (char_u *)ga.ga_data;
176 #endif 176 #endif