llvm-project
1fe6d564 - Fix a warning and an uninitialized variable in benchmark (#200927)

Commit
2 days ago
Fix a warning and an uninitialized variable in benchmark (#200927) After #198964 I see a -Wcovered-switch-default warning in sysinfo.cc, but it looks like it's uncovering something a bit worse. Back in #147357 and #149159 it looks like we tried to fix an MSVC warning for an uncovered `CacheUnknown` case in this switch, and removed the initialization of the variable before the switch. The update to Google Benchmark v1.9.5 has a different fix for this - it's handling that specific case guarded by some MSVC version macros, but this depends on the initialization we removed! Add the initialization back and remove the default case, effectively reverting #149159 and #147357.
Author
Parents
Loading