[all-commits] [llvm/llvm-project] 1fe6d5: Fix a warning and an uninitialized variable in ben...

Justin Bogner via All-commits all-commits at lists.llvm.org
Tue Jun 2 13:49:29 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1fe6d564523982d2efbd28334ef50fe449765eb5
      https://github.com/llvm/llvm-project/commit/1fe6d564523982d2efbd28334ef50fe449765eb5
  Author: Justin Bogner <mail at justinbogner.com>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M third-party/benchmark/src/sysinfo.cc

  Log Message:
  -----------
  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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list