diff options
author | Fan Yang <52458914+fanyang-mono@users.noreply.github.com> | 2022-06-22 01:07:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 01:07:11 +0300 |
commit | 18d7e3926db5ff7238f2d93364d39ac300c00ee4 (patch) | |
tree | ad19545abf2bc5c77b25659544a1a9dc34dcfa4f /src/mono/mono/metadata/loader.c | |
parent | 8558cdc3e26a0e28c386168be519f818678aadef (diff) |
[Mono] Fix C4018 warnings round II (#70783)
* Fix C4018 warnings round II
* Changes for x86
* Fix more C4018 warnings
* Last set of files being fixed within this PR
* Address review feedback and fix a build failure
* Update upd_locator_t to be in sync with locator_t
Diffstat (limited to 'src/mono/mono/metadata/loader.c')
-rw-r--r-- | src/mono/mono/metadata/loader.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mono/mono/metadata/loader.c b/src/mono/mono/metadata/loader.c index bee40a563b9..5a7117fd151 100644 --- a/src/mono/mono/metadata/loader.c +++ b/src/mono/mono/metadata/loader.c @@ -611,7 +611,6 @@ inflate_generic_signature_checked (MonoImage *image, MonoMethodSignature *sig, M { MonoMethodSignature *res; gboolean is_open; - int i; error_init (error); if (!context) @@ -624,7 +623,7 @@ inflate_generic_signature_checked (MonoImage *image, MonoMethodSignature *sig, M if (!is_ok (error)) goto fail; is_open = mono_class_is_open_constructed_type (res->ret); - for (i = 0; i < sig->param_count; ++i) { + for (guint16 i = 0; i < sig->param_count; ++i) { res->params [i] = mono_class_inflate_generic_type_checked (sig->params [i], context, error); if (!is_ok (error)) goto fail; @@ -645,7 +644,7 @@ inflate_generic_signature_checked (MonoImage *image, MonoMethodSignature *sig, M fail: if (res->ret) mono_metadata_free_type (res->ret); - for (i = 0; i < sig->param_count; ++i) { + for (guint16 i = 0; i < sig->param_count; ++i) { if (res->params [i]) mono_metadata_free_type (res->params [i]); } @@ -693,12 +692,12 @@ inflate_generic_header (MonoMethodHeader *header, MonoGenericContext *context, M error_init (error); - for (int i = 0; i < header->num_locals; ++i) { + for (guint16 i = 0; i < header->num_locals; ++i) { res->locals [i] = mono_class_inflate_generic_type_checked (header->locals [i], context, error); goto_if_nok (error, fail); } if (res->num_clauses) { - for (int i = 0; i < header->num_clauses; ++i) { + for (guint i = 0; i < header->num_clauses; ++i) { MonoExceptionClause *clause = &res->clauses [i]; if (clause->flags != MONO_EXCEPTION_CLAUSE_NONE) continue; |