]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Remove unused variables from vmhgfs modules.
authorVMware, Inc <>
Sat, 28 May 2011 19:29:16 +0000 (12:29 -0700)
committerMarcelo Vanzin <mvanzin@vmware.com>
Sat, 28 May 2011 19:29:16 +0000 (12:29 -0700)
When vmhgfs modules are compiled in a Fedora 15 VM, there were few
warnings about unused variables.

Made code changes to get rid of all unused variables to fix all the
warnings.

Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/modules/linux/vmhgfs/file.c
open-vm-tools/modules/linux/vmhgfs/fsutil.c

index 8319ceb1117f685a53616e0c9e7e5ca319a044a6..60a03e3426e66c39e7785f19bb65034cdfee52d7 100644 (file)
@@ -540,7 +540,6 @@ static int
 HgfsOpen(struct inode *inode,  // IN: Inode of the file to open
          struct file *file)    // IN: File pointer for this open
 {
-   HgfsSuperInfo *si;
    HgfsReq *req;
    HgfsOp opUsed;
    HgfsStatus replyStatus;
@@ -555,7 +554,6 @@ HgfsOpen(struct inode *inode,  // IN: Inode of the file to open
    ASSERT(file->f_dentry);
    ASSERT(file->f_dentry->d_inode);
 
-   si = HGFS_SB_TO_COMMON(inode->i_sb);
    iinfo = INODE_GET_II_P(inode);
 
    req = HgfsGetNewRequest();
@@ -1057,7 +1055,6 @@ static int
 HgfsRelease(struct inode *inode,  // IN: Inode that this file points to
             struct file *file)    // IN: File that is getting released
 {
-   HgfsSuperInfo *si;
    HgfsReq *req;
    HgfsHandle handle;
    HgfsOp opUsed;
@@ -1079,7 +1076,6 @@ HgfsRelease(struct inode *inode,  // IN: Inode that this file points to
    compat_filemap_write_and_wait(inode->i_mapping);
 
    HgfsReleaseFileInfo(file);
-   si = HGFS_SB_TO_COMMON(file->f_dentry->d_sb);
 
    req = HgfsGetNewRequest();
    if (!req) {
index e791df78de31e8b302b8d131b271424751e7de52..0c5102bea2808f4b9ede669850e30cd00e7e328b 100644 (file)
@@ -727,20 +727,16 @@ HgfsPrivateGetattr(struct dentry *dentry,  // IN: Dentry containing name
                    HgfsAttrInfo *attr,     // OUT: Attr to copy into
                    char **fileName)        // OUT: pointer to allocated file name
 {
-   struct HgfsSuperInfo *si;
    HgfsReq *req;
    HgfsStatus replyStatus;
    HgfsOp opUsed;
    int result = 0;
-   HgfsRequest *requestHeader;
    Bool allowHandleReuse = TRUE;
 
    ASSERT(dentry);
    ASSERT(dentry->d_sb);
    ASSERT(attr);
 
-   si = HGFS_SB_TO_COMMON(dentry->d_sb);
-
    req = HgfsGetNewRequest();
    if (!req) {
       LOG(4, (KERN_DEBUG "VMware hgfs: HgfsPrivateGetattr: out of memory "
@@ -748,7 +744,6 @@ HgfsPrivateGetattr(struct dentry *dentry,  // IN: Dentry containing name
       result = -ENOMEM;
       goto out;
    }
-   requestHeader = (HgfsRequest *)(HGFS_REQ_PAYLOAD(req));
 
   retry:
 
@@ -1081,14 +1076,12 @@ HgfsBuildPath(char *buffer,           // IN/OUT: Buffer to write into
    int retval = 0;
    size_t shortestNameLength;
    HgfsSuperInfo *si;
-   char *originalBuffer;
 
    ASSERT(buffer);
    ASSERT(dentry);
    ASSERT(dentry->d_sb);
 
    si = HGFS_SB_TO_COMMON(dentry->d_sb);
-   originalBuffer = buffer;
 
    /*
     * Buffer must hold at least the share name (which is already prefixed with
@@ -1156,8 +1149,7 @@ HgfsBuildPath(char *buffer,           // IN/OUT: Buffer to write into
 
    /* Don't forget the share name length (which also accounts for the nul). */
    retval += shortestNameLength;
-   LOG(4, (KERN_DEBUG "VMware hgfs: HgfsBuildPath: Built \"%s\"\n",
-          originalBuffer));
+   LOG(4, (KERN_DEBUG "VMware hgfs: HgfsBuildPath: Built \"%s\"\n", buffer));
 
    return retval;
 }