Bug 1222198

Summary: Fix nfs/mount3.c build warnings reported in Koji
Product: [Community] GlusterFS Reporter: Niels de Vos <ndevos>
Component: nfsAssignee: Niels de Vos <ndevos>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.7.0CC: bugs, gluster-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.7.1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1221095 Environment:
Last Closed: 2015-06-02 08:02:58 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:
Bug Depends On: 1221095    
Bug Blocks:    

Description Niels de Vos 2015-05-16 08:26:02 UTC
+++ This bug was initially created as a clone of Bug #1221095 +++

Description of problem:

This was observed in koji. Reported by Kaleb Keithley.

mount3.c: In function '__mnt3_build_mountid_from_path':
mount3.c:705:24: warning: 'sizeof' on array function parameter 'mountid' will return size of 'unsigned char *' [-Wsizeof-array-argument]
         length = sizeof(mountid);
                        ^
mount3.c:699:58: note: declared here
 __mnt3_build_mountid_from_path (const char *path, uuid_t mountid)
                                                          ^
mount3.c: In function '__mnt3_get_mount_id':
mount3.c:732:24: warning: 'sizeof' on array function parameter 'mountid' will return size of 'unsigned char *' [-Wsizeof-array-argument]
         length = sizeof(mountid);
                        ^
mount3.c:726:46: note: declared here
 __mnt3_get_mount_id (xlator_t *mntxl, uuid_t mountid)

Version-Release number of selected component (if applicable): mainline

--- Additional comment from Anand Avati on 2015-05-13 11:43:35 CEST ---

REVIEW: http://review.gluster.org/10765 (nfs: Use uuid_clear() instead of memset) posted (#1) for review on master by Vijay Bellur (vbellur)

--- Additional comment from Anand Avati on 2015-05-13 13:53:22 CEST ---

REVIEW: http://review.gluster.org/10765 (nfs: Use uuid_clear() instead of memset) posted (#2) for review on master by Vijay Bellur (vbellur)

--- Additional comment from Anand Avati on 2015-05-16 10:23:33 CEST ---

COMMIT: http://review.gluster.org/10765 committed in master by Niels de Vos (ndevos) 
------
commit df12f00851a234b0e892af4b958e606a1fa660ed
Author: Vijay Bellur <vbellur>
Date:   Wed May 13 11:41:31 2015 +0200

    nfs: Use uuid_clear() instead of memset
    
    Fixes the following incorrect usage:
    
    mount3.c: In function '__mnt3_build_mountid_from_path':
    mount3.c:705:24: warning: 'sizeof' on array function parameter 'mountid' will
    return size of 'unsigned char *' [-Wsizeof-array-argument]
             length = sizeof(mountid);
                            ^
    mount3.c:699:58: note: declared here
     __mnt3_build_mountid_from_path (const char *path, uuid_t mountid)
                                                              ^
    mount3.c: In function '__mnt3_get_mount_id':
    mount3.c:732:24: warning: 'sizeof' on array function parameter 'mountid' will
    return size of 'unsigned char *' [-Wsizeof-array-argument]
             length = sizeof(mountid);
                            ^
    mount3.c:726:46: note: declared here
     __mnt3_get_mount_id (xlator_t *mntxl, uuid_t mountid)
    
    Change-Id: I08f46c5994578fc99a7b61681e808d1115e41d71
    BUG: 1221095
    Signed-off-by: Vijay Bellur <vbellur>
    Reviewed-on: http://review.gluster.org/10765
    Reviewed-by: Niels de Vos <ndevos>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Tested-by: Gluster Build System <jenkins.com>

Comment 1 Anand Avati 2015-05-16 08:29:34 UTC
REVIEW: http://review.gluster.org/10798 (nfs: Use uuid_clear() instead of memset) posted (#1) for review on release-3.7 by Niels de Vos (ndevos)

Comment 2 Anand Avati 2015-05-30 10:34:36 UTC
REVIEW: http://review.gluster.org/10798 (nfs: Use uuid_clear() instead of memset) posted (#2) for review on release-3.7 by Niels de Vos (ndevos)

Comment 3 Niels de Vos 2015-06-02 08:02:58 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.1, please reopen this bug report.

glusterfs-3.7.1 has been announced on the Gluster Packaging mailinglist [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.packaging/1
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user