[PATCH] D100581: [Clang] -Wunused-but-set-parameter and -Wunused-but-set-variable

Andi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 27 01:35:10 PDT 2021


Abpostelnicu added a comment.

I think this added a regression, where you have this context:

  uint32_t LocalAccessible::SelectedItemCount() {
    uint32_t count = 0;
    AccIterator iter(this, filters::GetSelected);
    LocalAccessible* selected = nullptr;
    while ((selected = iter.Next())) ++count;
  
    return count;
  }



  [task 2021-04-27T02:39:42.523Z] 02:39:42    ERROR -  /builds/worker/checkouts/gecko/accessible/generic/LocalAccessible.cpp:2455:20: error: variable 'selected' set but not used [-Werror,-Wunused-but-set-variable]
  [task 2021-04-27T02:39:42.523Z] 02:39:42     INFO -    LocalAccessible* selected = nullptr;
  [task 2021-04-27T02:39:42.523Z] 02:39:42     INFO -                     ^
  [task 2021-04-27T02:39:42.523Z] 02:39:42     INFO -  1 error generated.

The file in cause is this <https://searchfox.org/mozilla-central/source/accessible/generic/LocalAccessible.cpp#2455> one.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100581/new/

https://reviews.llvm.org/D100581



More information about the cfe-commits mailing list