# Button Events Triggering unused variable 'target' error

**URL:** <http://forum.squareline.io/t/button-events-triggering-unused-variable-target-error/3837>\
**Category:** Bugs\
**Created:** [September 22, 2024, 10:43pm UTC](http://forum.squareline.io/t/button-events-triggering-unused-variable-target-error/3837 "2024-09-22T22:43:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Hermit](http://forum.squareline.io/user_avatar/forum.squareline.io/hermit/32/971_2.png) [@Hermit](http://forum.squareline.io/u/Hermit)\
**Post date:** [September 23, 2024, 10:55am UTC](http://forum.squareline.io/t/button-events-triggering-unused-variable-target-error/3837/2 "2024-09-23T10:55:38Z")

</div>

Compilers generally shouldn’t give error, just warning, if there’s a declared but unused variable, as it shouldn’t cause any problems and would be optimized away by the compiler. But we know some compilers and programmers prefer this very strict approach, so we’ll check if we can disable this prepared ‘target’ variable in the export when it’s not really needed. Thanks for the feedback.

---

_[View the full topic](http://forum.squareline.io/t/button-events-triggering-unused-variable-target-error/3837)._
