Skip to content

Commit

Permalink
Remove unused-variable in multipy/runtime/interpreter/interpreter_imp…
Browse files Browse the repository at this point in the history
…l.cpp +3

Summary:
LLVM-15 has a warning `-Wunused-variable` which we treat as an error because it's so often diagnostic of a code issue. Unused variables can compromise readability or, worse, performance.

This diff either (a) removes an unused variable and, possibly, it's associated code or (b) qualifies the variable with `[[maybe_unused]]`.

#buildsonlynotests - Builds are sufficient

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: wuyuoss

Differential Revision: D66143559

fbshipit-source-id: 5c3b7fe512f6fd29481a759d06291d8e930a51ff
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 19, 2024
1 parent fa01f56 commit 8e0454d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion multipy/runtime/interpreter/interpreter_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ struct __attribute__((visibility("hidden"))) ConcreteInterpreterObj

torch::deploy::Obj attr(const char* attribute) override {
MULTIPY_SAFE_RETHROW {
bool a = hasattr(attribute);
py::object pyObj = getPyObject().attr(attribute);
std::shared_ptr<ConcreteInterpreterObj> cObj =
std::make_shared<ConcreteInterpreterObj>(pyObj, owningSession_);
Expand Down

0 comments on commit 8e0454d

Please sign in to comment.