aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2015-02-17 21:18:36 -0500
committerZhang Rui <rui.zhang@intel.com>2015-02-28 00:52:48 -0500
commit986ffe0384c38606b94947fad04e5deacb515408 (patch)
tree9d8bacd9a76e8699c59532378d760f8166ca5d45 /tools
parent96a0d99c72cc4eb4f1b2acb71580693b91b95b28 (diff)
tools/thermal: tmon: silence 'set but not used' warnings
gcc complains about the 'cols' variable being unused. This is unavoidable, given the ncurses getmaxyx() macro-based API, which wants to assign to a variable directly, even when we're not going to use it. Warning: gcc -O1 -Wall -Wshadow -W -Wformat -Wimplicit-function-declaration -Wimplicit-int -fstack-protector -D VERSION=\"1.0\" -c -o tui.o tui.c tui.c: In function ‘show_dialogue’: tui.c:288:12: warning: variable ‘cols’ set but not used [-Wunused-but-set-variable] int rows, cols; ^ So, add a hack to get rid of that warning. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/thermal/tmon/tui.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/thermal/tmon/tui.c b/tools/thermal/tmon/tui.c
index 36e1f86c8452..b5d1c6b22dd3 100644
--- a/tools/thermal/tmon/tui.c
+++ b/tools/thermal/tmon/tui.c
@@ -293,6 +293,9 @@ void show_dialogue(void)
293 293
294 getmaxyx(w, rows, cols); 294 getmaxyx(w, rows, cols);
295 295
296 /* Silence compiler 'unused' warnings */
297 (void)cols;
298
296 werase(w); 299 werase(w);
297 box(w, 0, 0); 300 box(w, 0, 0);
298 mvwprintw(w, 0, maxx/4, DIAG_TITLE); 301 mvwprintw(w, 0, maxx/4, DIAG_TITLE);