benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

[BUG] Warnings

Open 1vanK opened this issue 1 year ago • 5 comments

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)

изображение

1vanK avatar Aug 17 '24 10:08 1vanK

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.

imrichardcole avatar Sep 06 '24 08:09 imrichardcole

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 avatar Sep 06 '24 14:09 LebedevRI

share your cmake build commands

https://github.com/dviglo2d/format_benchmarks/blob/main/third_party/benchmark/CMakeLists.txt#L4-L5

1vanK avatar Sep 12 '24 06:09 1vanK

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?

imrichardcole avatar Sep 15 '24 08:09 imrichardcole

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.

LebedevRI avatar Sep 15 '24 16:09 LebedevRI

It seems like the warning has been gone.

1vanK avatar Dec 04 '24 16:12 1vanK