From 5f19a76c2bce449aab462e7e8b41c756c9930cce Mon Sep 17 00:00:00 2001 From: Jim Warner Date: Tue, 25 Jan 2022 00:00:00 -0600 Subject: [PATCH] top: eliminate the potential warnings '-Wsign-compare' Signed-off-by: Jim Warner --- top/top.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/top/top.c b/top/top.c index ec2343e9..684f4656 100644 --- a/top/top.c +++ b/top/top.c @@ -4737,12 +4737,12 @@ static inline int wins_usrselect (const WIN_t *q, const int idx) { case 0: // uid selection inactive return 1; case 'U': // match any uid - if (p->ruid == q->usrseluid) return q->usrselflg; - if (p->suid == q->usrseluid) return q->usrselflg; - if (p->fuid == q->usrseluid) return q->usrselflg; + if (p->ruid == (unsigned)q->usrseluid) return q->usrselflg; + if (p->suid == (unsigned)q->usrseluid) return q->usrselflg; + if (p->fuid == (unsigned)q->usrseluid) return q->usrselflg; // fall through... case 'u': // match effective uid - if (p->euid == q->usrseluid) return q->usrselflg; + if (p->euid == (unsigned)q->usrseluid) return q->usrselflg; // fall through... default: // no match... ;