top: let's eliminate some additional compiler warnings

This patch eliminates those warnings referenced below.
They are sometimes associated with an obscure #define.

We'll also corrrect one header file function prototype
so it will aggree with the actual function definition.

Reference(s):
top.c: In function 'adj_geometry':
top.c:1874:20: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
 1874 |    if (Screen_cols < DOUBLE_limit) Curwin->rc.double_up = 0;
      |                    ^
top.c: In function 'zap_fieldstab':
top.c:2359:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 2359 |    if (wtab[EU_CPN].wmin < digits) {
      |                          ^
top.c:2365:26: warning: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Wsign-compare]
 2365 |    if (wtab[EU_NMA].wmin < digits) {
      |                          ^
top.c: In function 'keys_summary':
top.c:5128:45: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
 5128 |          if (w->rc.double_up && Screen_cols < DOUBLE_limit) {
      |                                             ^
top.c: In function 'sum_tics':
top.c:5605:22: warning: unused variable 'num_syst' [-Wunused-variable]
 5605 |    int ix, num_user, num_syst;
      |                      ^~~~~~~~
top.c:5605:12: warning: unused variable 'num_user' [-Wunused-variable]
 5605 |    int ix, num_user, num_syst;
      |            ^~~~~~~~

Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
Jim Warner
2022-02-12 00:00:00 -06:00
committed by Craig Small
parent 0847ea8360
commit 2c12f1f295
2 changed files with 15 additions and 12 deletions

View File

@@ -677,7 +677,7 @@ typedef struct WIN_t {
//atic void wins_stage_2 (void);
//atic inline int wins_usrselect (const WIN_t *q, int idx);
/*------ Forest View support -------------------------------------------*/
//atic void forest_adds (const int self, unsigned level);
//atic void forest_adds (const int self, int level);
//atic void forest_begin (WIN_t *q);
//atic void forest_config (WIN_t *q);
//atic inline const char *forest_display (const WIN_t *q, int idx);