Skip to content

Commit

Permalink
Variable "_custom_impl_clusters" unused before it went out of scope
Browse files Browse the repository at this point in the history
When generating data model with no clusters then a build error is
generated due to the "_custom_impl_clusters" variable being unused
before it went out of scope.

```
ERROR at //src/app/chip_data_model.gni:192:29: Assignment had no effect.
    _custom_impl_clusters = []
                            ^
You set the variable "_custom_impl_clusters" here and it was unused
before it went out of scope.
```

To prevent the issue, "_custom_impl_clusters" can be marked as not
needed.
  • Loading branch information
swan-amazon committed Feb 18, 2023
1 parent 01b88b4 commit 213c0b0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/chip_data_model.gni
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ template("chip_data_model") {
}

_custom_impl_clusters = []
not_needed([ "_custom_impl_clusters" ]) # Might not be needed.
if (defined(invoker.zap_clusters_with_custom_implementation)) {
_custom_impl_clusters = invoker.zap_clusters_with_custom_implementation
}
Expand Down

0 comments on commit 213c0b0

Please sign in to comment.