Mercurial > vim
comparison src/scriptfile.c @ 19061:5a62b4a0c961 v8.2.0091
patch 8.2.0091: compiler warnings for size_t / int types
Commit: https://github.com/vim/vim/commit/4d7a248b644b647340ed1a25729e2ed586a54864
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Jan 6 19:53:43 2020 +0100
patch 8.2.0091: compiler warnings for size_t / int types
Problem: Compiler warnings for size_t / int types.
Solution: Change type to size_t. (Mike Williams)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 06 Jan 2020 20:00:06 +0100 |
parents | 6b2d93436388 |
children | af1eca322b9e |
comparison
equal
deleted
inserted
replaced
19060:1bb31d1b3e66 | 19061:5a62b4a0c961 |
---|---|
95 char_u * | 95 char_u * |
96 estack_sfile(void) | 96 estack_sfile(void) |
97 { | 97 { |
98 estack_T *entry; | 98 estack_T *entry; |
99 #ifdef FEAT_EVAL | 99 #ifdef FEAT_EVAL |
100 int len; | 100 size_t len; |
101 int idx; | 101 int idx; |
102 char *res; | 102 char *res; |
103 int done; | 103 size_t done; |
104 #endif | 104 #endif |
105 | 105 |
106 entry = ((estack_T *)exestack.ga_data) + exestack.ga_len - 1; | 106 entry = ((estack_T *)exestack.ga_data) + exestack.ga_len - 1; |
107 if (entry->es_name == NULL) | 107 if (entry->es_name == NULL) |
108 return NULL; | 108 return NULL; |
124 break; | 124 break; |
125 } | 125 } |
126 len += STRLEN(entry->es_name) + 15; | 126 len += STRLEN(entry->es_name) + 15; |
127 } | 127 } |
128 | 128 |
129 res = (char *)alloc(len); | 129 res = (char *)alloc((int)len); |
130 if (res != NULL) | 130 if (res != NULL) |
131 { | 131 { |
132 STRCPY(res, "function "); | 132 STRCPY(res, "function "); |
133 while (idx < exestack.ga_len - 1) | 133 while (idx < exestack.ga_len - 1) |
134 { | 134 { |