top: fix selected miscellaneous compiler warnings
These per instance warnings have been eliminated:
warning: range expressions in switch statements are non-standard
warning: padding struct to align 'winflags'
warning: dereferencing type-punned pointer will break strict-aliasing rules
These per instance warnings have not been addressed
since they simply trade one warning for another:
From:
warning: ISO C does not permit named variadic macros
warning: ISO C does not support the '%Lu' gnu_scanf format
To:
warning: anonymous variadic macros were introduced in C99
warning: ISO C90 does not support the 'll' gnu_scanf length modifier
Lastly, since all C compilers have supported use of
C++ style comments for the past 20 years, the top
program will never trade them for the often more
cumbersome C style comments simply to avoid this
once per source file warning:
warning: C++ style comments are not allowed in ISO C90
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
@@ -291,8 +291,8 @@ enum warn_enum {
|
||||
|
||||
/* This type helps support both a window AND the rcfile */
|
||||
typedef struct RCW_t { // the 'window' portion of an rcfile
|
||||
FLG_t sortindx; // sort field, represented as a procflag
|
||||
int winflags, // 'view', 'show' and 'sort' mode flags
|
||||
int sortindx, // sort field, represented as a procflag
|
||||
winflags, // 'view', 'show' and 'sort' mode flags
|
||||
maxtasks, // user requested maximum, 0 equals all
|
||||
summclr, // color num used in summ info
|
||||
msgsclr, // " in msgs/pmts
|
||||
|
||||
Reference in New Issue
Block a user