--- a/src/ui/tab.cpp
+++ b/src/ui/tab.cpp
@@ -419,7 +419,7 @@
             }
         }
 
-        int toggle_len = 0;
+        int toggle_len __attribute__((__unused__)) = 0;
         int item_len = 0;
         unsigned int len = 0;
         unsigned int sink_pos = 0;
