tools/thermal: tmon: silence 'set but not used' warnings
authorBrian Norris <computersforpeace@gmail.com>
Wed, 18 Feb 2015 02:18:36 +0000 (18:18 -0800)
committerZhang Rui <rui.zhang@intel.com>
Sat, 28 Feb 2015 05:52:48 +0000 (13:52 +0800)
commit986ffe0384c38606b94947fad04e5deacb515408
tree9d8bacd9a76e8699c59532378d760f8166ca5d45
parent96a0d99c72cc4eb4f1b2acb71580693b91b95b28
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>
tools/thermal/tmon/tui.c