Fix native build warnings (dotnet/core-setup#5389)
authorVitek Karas <vitek.karas@microsoft.com>
Fri, 8 Mar 2019 17:41:00 +0000 (09:41 -0800)
committerGitHub <noreply@github.com>
Fri, 8 Mar 2019 17:41:00 +0000 (09:41 -0800)
Commit migrated from https://github.com/dotnet/core-setup/commit/54afeff31b17226d98b9a25c7c6d9abd6b4d35fc

src/installer/corehost/cli/args.h
src/installer/corehost/cli/libhost.h

index 55709c4..fd56f65 100644 (file)
@@ -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;
 
index 2c27eb0..913e4fe 100644 (file)
@@ -114,8 +114,6 @@ private:
     bool m_is_framework_dependent;
     std::vector<pal::string_t> m_probe_paths;
     std::vector<const pal::char_t*> 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<pal::string_t> 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);