diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c
index 36e1f86c84529..b5d1c6b22dd3c 100644
--- a/tools/thermal/tmon/tui.c
+++ b/tools/thermal/tmon/tui.c
@@ -293,6 +293,9 @@ void show_dialogue(void)
 
 	getmaxyx(w, rows, cols);
 
+	/* Silence compiler 'unused' warnings */
+	(void)cols;
+
 	werase(w);
 	box(w, 0, 0);
 	mvwprintw(w, 0, maxx/4, DIAG_TITLE);