Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1336419

Summary: nfsd: Remove some warnings nfsd.c
Product: Red Hat Enterprise Linux 7 Reporter: Steve Dickson <steved>
Component: nfs-utilsAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Yongcheng Yang <yoyang>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: eguan, fs-qe, xzhou, yoyang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nfs-utils-1.3.0-0.27.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:03:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Dickson 2016-05-16 12:28:19 UTC
Description of problem:

It would be nice to remove a couple compile warnings with
this upstream commit:

commit a2e431fdd114f2c2466573471dafef9024392f2d
Author: Steve Dickson <steved>
Date:   Wed Apr 30 12:26:06 2014 -0400

    nfsd: Remove some warnings nfsd.c
    
    nfsd.c:347:15: warning: comparison between signed and unsigned integer
    expressions [-Wsign-compare]
    nfsd.c:385:13: warning: comparison between signed and unsigned integer
    expressions [-Wsign-compare]
    
    Signed-off-by: Steve Dickson <steved>

diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c
index 73d6a92..03e3c81 100644
--- a/utils/nfsd/nfsd.c
+++ b/utils/nfsd/nfsd.c
@@ -101,7 +101,7 @@ main(int argc, char **argv)
        int     count = NFSD_NPROC, c, i, error = 0, portnum = 0, fd, found_one;
        char *p, *progname, *port, *rdma_port = NULL;
        char **haddr = NULL;
-       unsigned int hcounter = 0;
+       int hcounter = 0;
        int     socket_up = 0;
        unsigned int minorvers = 0;

Comment 4 Yongcheng Yang 2016-09-01 08:04:57 UTC
Have verified the warning disappeared with latest nfs-utils
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-----------------------------------------------------------
[yoyang@fs-qe nfsd]$ make clean ; make 
rm -rf .libs _libs
 rm -f nfsd
rm -f *.o
rm -f *.lo
gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2 -MT nfsd.o -MD -MP -MF .deps/nfsd.Tpo -c -o nfsd.o nfsd.c
mv -f .deps/nfsd.Tpo .deps/nfsd.Po
gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2 -MT nfssvc.o -MD -MP -MF .deps/nfssvc.Tpo -c -o nfssvc.o nfssvc.c
mv -f .deps/nfssvc.Tpo .deps/nfssvc.Po
/bin/sh ../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2   -o nfsd nfsd.o nfssvc.o ../../support/nfs/libnfs.a -ltirpc 
libtool: link: gcc -Wall -Wextra -Wstrict-prototypes -pipe -g -O2 -o nfsd nfsd.o nfssvc.o  ../../support/nfs/libnfs.a -ltirpc
[yoyang@fs-qe nfsd]$ 


And it can be reproduced before the patch merged:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-------------------------------------------------
[yoyang@fs-qe nfsd]$ make clean ; make
rm -rf .libs _libs
 rm -f nfsd
rm -f *.o
rm -f *.lo
gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2 -MT nfsd.o -MD -MP -MF .deps/nfsd.Tpo -c -o nfsd.o nfsd.c
nfsd.c: In function ‘main’:
nfsd.c:347:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  } while (++i < hcounter); 
               ^
nfsd.c:385:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(i=0; i < hcounter; i++)
             ^
mv -f .deps/nfsd.Tpo .deps/nfsd.Po
gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/usr/include/tirpc -D_GNU_SOURCE -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2 -MT nfssvc.o -MD -MP -MF .deps/nfssvc.Tpo -c -o nfssvc.o nfssvc.c
mv -f .deps/nfssvc.Tpo .deps/nfssvc.Po
/bin/sh ../../libtool  --tag=CC   --mode=link gcc -Wall -Wextra -Wstrict-prototypes  -pipe -g -O2   -o nfsd nfsd.o nfssvc.o ../../support/nfs/libnfs.a -ltirpc 
libtool: link: gcc -Wall -Wextra -Wstrict-prototypes -pipe -g -O2 -o nfsd nfsd.o nfssvc.o  ../../support/nfs/libnfs.a -ltirpc
[yoyang@fs-qe nfsd]$ 


So move on to VERIFIED

Comment 6 errata-xmlrpc 2016-11-04 05:03:55 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2383.html