benchmark
benchmark copied to clipboard
[BUG] Warnings
Severity Code Description Project File Line Suppression State Details
Warning C26495 Variable 'benchmark::BenchmarkReporter::Run::family_index' is uninitialized. Always initialize a member variable (type.6). benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1846
Warning C26495 Variable 'benchmark::BenchmarkReporter::Run::per_family_instance_index' is uninitialized. Always initialize a member variable (type.6). benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1846
Warning C26495 Variable 'benchmark::BenchmarkReporter::Run::repetition_index' is uninitialized. Always initialize a member variable (type.6). benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1846
Warning C26495 Variable 'benchmark::BenchmarkReporter::Run::repetitions' is uninitialized. Always initialize a member variable (type.6). benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1846
Warning C26495 Variable 'benchmark::BenchmarkReporter::Run::statistics' is uninitialized. Always initialize a member variable (type.6). benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1846
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4459 declaration of 'profiler_manager' hides global declaration benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\src\benchmark_runner.cc 129
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Warning C4324 'benchmark::State': structure was padded due to alignment specifier benchmark F:\my_games\dviglo2d_utils\format_benchmarks\repo\third_party\benchmark\repo\include\benchmark\benchmark.h 1065
Windows 10, Visual Studio 2022 (version 17.10.4)
I think a few of these are now fixed as mentioned above, but I'll take a look to see if any remain @1vanK could you please share your cmake build commands?
Thanks
Rich.
As noted in #1839, the rest of the warnings are from MSVC static analyzer. I'm not sure we should enable it globally in cmakefiles, but perhaps there is some diagnostics flag for gcc/clang that catches those, and if so, we should enable it.
share your cmake build commands
https://github.com/dviglo2d/format_benchmarks/blob/main/third_party/benchmark/CMakeLists.txt#L4-L5
As noted in #1839, the rest of the warnings are from MSVC static analyzer. I'm not sure we should enable it globally in cmakefiles, but perhaps there is some diagnostics flag for gcc/clang that catches those, and if so, we should enable it.
@LebedevRI to understand your comment, do we want to enable/fix these for MSVC?
No idea about MSVC, but perhaps these same issues can be exposed by some gcc/clang warning flag, and if so, perhaps that flag should be enabled.
It seems like the warning has been gone.