summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Warner <james.warner@comcast.net>2018-05-18 00:00:00 -0500
committerCraig Small <csmall@enc.com.au>2018-05-19 21:47:58 +1000
commit607edc20645a53469483c97edcd1d30975fdd408 (patch)
tree75ddc4ad62ac31f152b193b027a36d75d16f4ad0
parentde807a639fdae90415433c8f8b9fde9de6627eb2 (diff)
downloadprocps-ng-607edc20645a53469483c97edcd1d30975fdd408.tar.gz
top: eliminate a couple of warnings of -Wunused-result
Signed-off-by: Jim Warner <james.warner@comcast.net>
-rw-r--r--top/top.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/top/top.c b/top/top.c
index 8318912..1ff44e5 100644
--- a/top/top.c
+++ b/top/top.c
@@ -3706,8 +3706,7 @@ static const char *config_file (FILE *fp, const char *name, float *delay) {
const char *p = NULL;
p = fmtmk(N_fmt(RC_bad_files_fmt), name);
- if (fgets(fbuf, sizeof(fbuf), fp)) // ignore eyecatcher
- ; // avoid -Wunused-result
+ (void)fgets(fbuf, sizeof(fbuf), fp); // ignore eyecatcher
if (6 != fscanf(fp
, "Id:%c, Mode_altscr=%d, Mode_irixps=%d, Delay_time=%d.%d, Curwin=%d\n"
, &Rc.id, &Rc.mode_altscr, &Rc.mode_irixps, &tmp_whole, &tmp_fract, &i)) {
@@ -3797,9 +3796,8 @@ static const char *config_file (FILE *fp, const char *name, float *delay) {
} // end: for (GROUPSMAX)
// any new addition(s) last, for older rcfiles compatibility...
- if (fscanf(fp, "Fixed_widest=%d, Summ_mscale=%d, Task_mscale=%d, Zero_suppress=%d\n"
- , &Rc.fixed_widest, &Rc.summ_mscale, &Rc.task_mscale, &Rc.zero_suppress))
- ; // avoid -Wunused-result
+ (void)fscanf(fp, "Fixed_widest=%d, Summ_mscale=%d, Task_mscale=%d, Zero_suppress=%d\n"
+ , &Rc.fixed_widest, &Rc.summ_mscale, &Rc.task_mscale, &Rc.zero_suppress);
if (Rc.fixed_widest < -1 || Rc.fixed_widest > SCREENMAX)
Rc.fixed_widest = 0;
if (Rc.summ_mscale < 0 || Rc.summ_mscale > SK_Eb)