From 08bfd2862f748d1db2d370fb6160a6bb2a4f97f7 Mon Sep 17 00:00:00 2001 From: Vitek Karas Date: Fri, 8 Mar 2019 09:41:00 -0800 Subject: [PATCH] Fix native build warnings (dotnet/core-setup#5389) Commit migrated from https://github.com/dotnet/core-setup/commit/54afeff31b17226d98b9a25c7c6d9abd6b4d35fc --- src/installer/corehost/cli/args.h | 1 - src/installer/corehost/cli/libhost.h | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/installer/corehost/cli/args.h b/src/installer/corehost/cli/args.h index 55709c4..fd56f65 100644 --- a/src/installer/corehost/cli/args.h +++ b/src/installer/corehost/cli/args.h @@ -13,7 +13,6 @@ struct probe_config_t { pal::string_t probe_dir; - bool patch_roll_fwd; const deps_json_t* probe_deps_json; int fx_level; diff --git a/src/installer/corehost/cli/libhost.h b/src/installer/corehost/cli/libhost.h index 2c27eb0..913e4fe 100644 --- a/src/installer/corehost/cli/libhost.h +++ b/src/installer/corehost/cli/libhost.h @@ -114,8 +114,6 @@ private: bool m_is_framework_dependent; std::vector m_probe_paths; std::vector m_probe_paths_cstr; - bool m_patch_roll_forward; - bool m_prerelease_roll_forward; host_mode_t m_host_mode; host_interface_t m_host_interface; std::vector m_fx_names; @@ -223,8 +221,11 @@ public: hi.probe_paths.len = m_probe_paths_cstr.size(); hi.probe_paths.arr = m_probe_paths_cstr.data(); - hi.patch_roll_forward = m_patch_roll_forward; - hi.prerelease_roll_forward = m_prerelease_roll_forward; + // These are not used anymore, but we have to keep them for backward compat reasons. + // Set default values. + hi.patch_roll_forward = true; + hi.prerelease_roll_forward = false; + hi.host_mode = m_host_mode; hi.tfm = m_tfm.c_str(); @@ -369,7 +370,7 @@ struct hostpolicy_init_t // The found_ver was not passed previously, so obtain that from fx_dir pal::string_t fx_found_ver; - int index = fx_dir.rfind(DIR_SEPARATOR); + size_t index = fx_dir.rfind(DIR_SEPARATOR); if (index != pal::string_t::npos) { fx_found_ver = fx_dir.substr(index + 1); -- 2.7.4