vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

[spdlog/x86_32_windows] many warnings after compile

Open imamushroom opened this issue 6 years ago • 3 comments

Host Environment

  • OS: Windows
  • Compiler: VS2019

To Reproduce Steps to reproduce the behavior: ./vcpkg install spdlog

Compile:

#include "spdlog/spdlog.h"
#include "spdlog/sinks/rotating_file_sink.h"
#include <iostream>

	auto max_size = 1048576 * 5;
	auto max_files = 5;
	
	try
	{
		auto logger = spdlog::rotating_logger_mt("Tests", "./logs/tests.txt", max_size, max_files);
		spdlog::set_default_logger(logger);
		spdlog::set_level(spdlog::level::trace);
	}
	catch (const spdlog::spdlog_ex& ex)
	{
		std::cout << "Log initialization failed: " << ex.what() << std::endl;
	}

        spdlog::info("Testing, testing, 1,2,3");
	spdlog::debug("Testing, testing, 1,2,3");
}

Failure logs Severity Code Description Project File Line Suppression State Warning C26495 Variable 'fmt::v6::localtime::dispatcher::tm_' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\chrono.h 322 Warning C26495 Variable 'fmt::v6::gmtime::dispatcher::tm_' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\chrono.h 359 Warning C26812 The enum type 'fmt::v6::internal::char8_type' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 517 Warning C26812 The enum type 'fmt::v6::align::type' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1051 Warning C26812 The enum type 'fmt::v6::sign::type' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1052 Warning C26495 Variable 'fmt::v6::internal::basic_writer<fmt::v6::buffer_range >::int_writer<__int64,fmt::v6::basic_format_specs >::prefix' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1493 Warning C26495 Variable 'fmt::v6::internal::basic_writer<fmt::v6::buffer_range >::int_writer<char,fmt::v6::basic_format_specs >::prefix' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1493 Warning C26495 Variable 'fmt::v6::internal::basic_writer<fmt::v6::buffer_range >::int_writer<int,fmt::v6::basic_format_specs >::prefix' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1493 Warning C26495 Variable 'fmt::v6::internal::basic_writer<fmt::v6::buffer_range >::int_writer<unsigned int64,fmt::v6::basic_format_specs >::prefix' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1493 Warning C26495 Variable 'fmt::v6::internal::basic_writer<fmt::v6::buffer_range >::int_writer<unsigned int,fmt::v6::basic_format_specs >::prefix' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\fmt_x86-windows\include\fmt\format.h 1493 Warning C26495 Variable 'fmt::v6::localtime::dispatcher::tm' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\spdlog\include\spdlog\fmt\bundled\chrono.h 322 Warning C26495 Variable 'fmt::v6::gmtime::dispatcher::tm' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\spdlog\include\spdlog\fmt\bundled\chrono.h 359 Warning C26812 The enum type 'spdlog::level::level_enum' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\spdlog_x86-windows\include\spdlog\common-inl.h 16 Warning C6387 'f' could be '0': this does not adhere to the specification for the function '_fileno'. mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\spdlog_x86-windows\include\spdlog\details\os-inl.h 210 Warning C26812 The enum type 'spdlog::details::padding_info::pad_side' is unscoped. Prefer 'enum class' over 'enum' (Enum.3). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\spdlog_x86-windows\include\spdlog\pattern_formatter.h 33 Warning C26495 Variable 'State::m_working_times' is uninitialized. Always initialize a member variable (type.6). mt4 C:\Users\andre\source\repos\HolyGrail2\mt4\State.cpp 3

Additional context

imamushroom avatar Sep 18 '20 12:09 imamushroom

The related source issue: https://github.com/gabime/spdlog/issues/1666

LilyWangL avatar Sep 21 '20 06:09 LilyWangL

It's a upstream issue, see https://github.com/fmtlib/fmt/issues/1131.

JackBoosY avatar Sep 22 '20 06:09 JackBoosY

According to the official reply, I think this issue can be ignored.

JackBoosY avatar Dec 23 '20 09:12 JackBoosY