Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Warnings #1838

Open
1vanK opened this issue Aug 17, 2024 · 5 comments
Open

[BUG] Warnings #1838

1vanK opened this issue Aug 17, 2024 · 5 comments

Comments

@1vanK
Copy link

1vanK commented Aug 17, 2024

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)

изображение

@imrichardcole
Copy link
Contributor

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.

@LebedevRI
Copy link
Collaborator

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.

@1vanK
Copy link
Author

1vanK commented Sep 12, 2024

@imrichardcole
Copy link
Contributor

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?

@LebedevRI
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants