]> granicus.if.org Git - procps-ng/commitdiff
top: eliminate the potential warnings '-Wsign-compare'
authorJim Warner <james.warner@comcast.net>
Tue, 25 Jan 2022 06:00:00 +0000 (00:00 -0600)
committerCraig Small <csmall@dropbear.xyz>
Tue, 1 Feb 2022 05:11:55 +0000 (16:11 +1100)
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index ec2343e926312e5d3e1e58b98dc2feb7b1083048..684f46564a503c7ee7d02862b84e3b29b04560e4 100644 (file)
--- 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...
          ;