]> granicus.if.org Git - procps-ng/commit
top: let's eliminate some additional compiler warnings
authorJim Warner <james.warner@comcast.net>
Mon, 14 Feb 2022 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Thu, 17 Feb 2022 07:24:55 +0000 (18:24 +1100)
commit41b2b9dca8d4011c0e9d7b5cbee8d0e434464989
tree01e6b17e23f4fad9b3654558ac854991413df33f
parent081126f36ffea0349c3da95fd276fb8b80348d86
top: let's eliminate some additional compiler warnings

This patch eliminates those warnings referenced below.

[ the last error shown needed a little extra cleanup ]
[ for when that '#define SCROLLVAR_NO' is activated. ]

Reference(s):
top.c: In function 'adj_geometry':
top.c:1976:20: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
 1976 |    if (Screen_cols < DOUBLE_limit) Curwin->rc.double_up = 0;
      |                    ^
top.c: In function 'zap_fieldstab':
top.c:2436:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 2436 |    if (wtab[EU_CPN].wmin < digits) {
      |                          ^
top.c:2442:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 2442 |    if (wtab[EU_NMA].wmin < digits) {
      |                          ^
top.c: In function 'keys_summary':
top.c:5382:45: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
 5382 |          if (w->rc.double_up && Screen_cols < DOUBLE_limit) {
      |                                             ^
top.c: In function 'task_show':
top.c:6306:13: error: expected ';' before 'else'
 6306 |             else
      |             ^~~~

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c