diff options
| author | Jamie Madill <jmadill@chromium.org> | 2016-07-06 11:19:42 -0400 |
|---|---|---|
| committer | Mark Young <marky@lunarg.com> | 2016-07-06 10:53:12 -0600 |
| commit | e4afbe83c7b5df8673b843bcaa7dc98bce036d3c (patch) | |
| tree | 8126277177b5cd2b36e5c8c7fd9207c5cec8e6b9 | |
| parent | 3cd6807374122df36ea8baa37ba5b3360fc81b16 (diff) | |
| download | usermoji-e4afbe83c7b5df8673b843bcaa7dc98bce036d3c.tar.xz | |
loader: Fix 2 warnings detected in VS2015.
warning C4456: declaration of 'i' hides previous local declaration
warning C4244: '=': conversion from 'int' to 'uint16_t', possible loss of data
Change-Id: I651de053b206afa36fce27af92ffbe0a608e89d0
| -rw-r--r-- | loader/loader.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/loader/loader.c b/loader/loader.c index 6deadd2b..d0cdc00b 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -2400,13 +2400,13 @@ loader_add_layer_properties(const struct loader_instance *inst, // Get the major/minor/and patch as integers for easier comparison vers_tok = strtok(file_vers, ".\"\n\r"); if (NULL != vers_tok) { - file_major_vers = atoi(vers_tok); + file_major_vers = (uint16_t)atoi(vers_tok); vers_tok = strtok(NULL, ".\"\n\r"); if (NULL != vers_tok) { - file_minor_vers = atoi(vers_tok); + file_minor_vers = (uint16_t)atoi(vers_tok); vers_tok = strtok(NULL, ".\"\n\r"); if (NULL != vers_tok) { - file_patch_vers = atoi(vers_tok); + file_patch_vers = (uint16_t)atoi(vers_tok); } } } @@ -2831,13 +2831,13 @@ VkResult loader_icd_scan(const struct loader_instance *inst, // Get the major/minor/and patch as integers for easier comparison vers_tok = strtok(file_vers, ".\"\n\r"); if (NULL != vers_tok) { - file_major_vers = atoi(vers_tok); + file_major_vers = (uint16_t)atoi(vers_tok); vers_tok = strtok(NULL, ".\"\n\r"); if (NULL != vers_tok) { - file_minor_vers = atoi(vers_tok); + file_minor_vers = (uint16_t)atoi(vers_tok); vers_tok = strtok(NULL, ".\"\n\r"); if (NULL != vers_tok) { - file_patch_vers = atoi(vers_tok); + file_patch_vers = (uint16_t)atoi(vers_tok); } } } @@ -2952,7 +2952,6 @@ void loader_layer_scan(const struct loader_instance *inst, struct loader_manifest_files manifest_files[2]; // [0] = explicit, [1] = implicit cJSON *json; - uint32_t i; uint32_t implicit; bool lockedMutex = false; @@ -2986,7 +2985,7 @@ void loader_layer_scan(const struct loader_instance *inst, loader_platform_thread_lock_mutex(&loader_json_lock); lockedMutex = true; for (implicit = 0; implicit < 2; implicit++) { - for (i = 0; i < manifest_files[implicit].count; i++) { + for (uint32_t i = 0; i < manifest_files[implicit].count; i++) { file_str = manifest_files[implicit].filename_list[i]; if (file_str == NULL) continue; |
