Add compiler flags to fail any builds that produce that warning.
The member initialization list is always evaluated in the order the
members are delcared in the class, not the order in which they are
listed in the member initialization list. So modify the member
initialization lists to match the order in which they will be evaluated.
Commit migrated from https://github.com/dotnet/core-setup/commit/
dcbb048073e3745df48e52d0619648f7aae8fa3d
{
public:
bundle_runner_t(const pal::string_t& bundle_path)
- :m_bundle_path(bundle_path),
- m_bundle_stream(nullptr),
- m_manifest(nullptr),
- m_num_embedded_files(0)
+ : m_bundle_stream(nullptr)
+ , m_manifest(nullptr)
+ , m_num_embedded_files(0)
+ , m_bundle_path(bundle_path)
{
}
typedef str_to_vector_map_t rid_fallback_graph_t;
deps_json_t()
- : m_valid(false)
- , m_file_exists(false)
+ : m_file_exists(false)
+ , m_valid(false)
{
}
{
public:
fx_reference_t()
- : fx_name(_X(""))
- , fx_version(_X(""))
- , fx_version_number()
- , has_patch_roll_fwd(false)
+ : has_patch_roll_fwd(false)
, patch_roll_fwd(false)
, has_roll_fwd_on_no_candidate_fx(false)
- , use_exact_version(false)
, roll_fwd_on_no_candidate_fx((roll_fwd_on_no_candidate_fx_option)0)
+ , use_exact_version(false)
+ , fx_name(_X(""))
+ , fx_version(_X(""))
+ , fx_version_number()
{ }
const pal::string_t& get_fx_name() const
const std::vector<pal::string_t>& probe_paths,
const host_mode_t mode,
const fx_definition_vector_t& fx_definitions)
- : m_host_command(host_command)
- , m_host_info_host_path(host_info.host_path)
- , m_host_info_dotnet_root(host_info.dotnet_root)
- , m_host_info_app_path(host_info.app_path)
+ : m_tfm(get_app(fx_definitions).get_runtime_config().get_tfm())
, m_deps_file(deps_file)
, m_additional_deps_serialized(additional_deps_serialized)
, m_is_framework_dependent(get_app(fx_definitions).get_runtime_config().get_is_framework_dependent())
, m_probe_paths(probe_paths)
, m_host_mode(mode)
, m_host_interface()
- , m_tfm(get_app(fx_definitions).get_runtime_config().get_tfm())
+ , m_host_command(host_command)
+ , m_host_info_host_path(host_info.host_path)
+ , m_host_info_dotnet_root(host_info.dotnet_root)
+ , m_host_info_app_path(host_info.app_path)
{
make_cstr_arr(m_probe_paths, &m_probe_paths_cstr);
#include <utils.h>
arguments_t::arguments_t()
- : managed_application(_X(""))
- , host_mode(host_mode_t::invalid)
+ : host_mode(host_mode_t::invalid)
, host_path(_X(""))
, app_root(_X(""))
+ , deps_path(_X(""))
+ , core_servicing(_X(""))
+ , managed_application(_X(""))
, app_argc(0)
, app_argv(nullptr)
- , core_servicing(_X(""))
- , deps_path(_X(""))
{
}
: probe_dir(probe_dir)
, probe_deps_json(probe_deps_json)
, fx_level(fx_level)
- , only_serviceable_assets(only_serviceable_assets)
, only_runtime_assets(only_runtime_assets)
+ , only_serviceable_assets(only_serviceable_assets)
, probe_publish_dir(probe_publish_dir)
{
}
#include "breadcrumbs.h"
breadcrumb_writer_t::breadcrumb_writer_t(bool enabled, const std::unordered_set<pal::string_t> &files)
- : m_status(false)
+ : m_files(files)
, m_enabled(enabled)
- , m_files(files)
+ , m_status(false)
{
if (enabled && !pal::get_default_breadcrumb_store(&m_breadcrumb_store))
{
bool is_framework_dependent)
: m_fx_definitions(fx_definitions)
, m_app_dir(args.app_root)
+ , m_host_mode(args.host_mode)
, m_managed_app(args.managed_application)
- , m_is_framework_dependent(is_framework_dependent)
, m_core_servicing(args.core_servicing)
- , m_host_mode(args.host_mode)
+ , m_is_framework_dependent(is_framework_dependent)
{
int lowest_framework = m_fx_definitions.size() - 1;
int root_framework = -1;
//=================================================================================
// Ctor
bootstrap_thunk_chunk::bootstrap_thunk_chunk(size_t numThunks, pal::dll_t dll)
- : m_numThunks(numThunks), m_dll(dll), m_next(NULL)
+ : m_dll(dll), m_numThunks(numThunks), m_next(NULL)
{
#ifdef _DEBUG
memset(m_thunks, 0, m_numThunks * sizeof(bootstrap_thunk));
add_compile_options(/DEBUG)
add_compile_options(/GS)
add_compile_options(/W1)
+ add_compile_options(/we5038) # make reorder warnings into errors
add_compile_options(/Zc:inline)
add_compile_options(/fp:precise)
add_compile_options(/EHsc)
set(CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib")
else()
add_compile_options(-Wno-unused-local-typedef)
+ add_compile_options(-Werror=reorder)
endif()
# Older CMake doesn't support CMAKE_CXX_STANDARD and GCC/Clang need a switch to enable C++ 11