From: VMware, Inc <> Date: Sat, 28 May 2011 19:29:16 +0000 (-0700) Subject: Remove unused variables from vmhgfs modules. X-Git-Tag: 2011.05.27-420096~67 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31c63fdf6fcb24ae7a2583ff877d5cf088d8ed89;p=thirdparty%2Fopen-vm-tools.git Remove unused variables from vmhgfs modules. 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 --- diff --git a/open-vm-tools/modules/linux/vmhgfs/file.c b/open-vm-tools/modules/linux/vmhgfs/file.c index 8319ceb11..60a03e342 100644 --- a/open-vm-tools/modules/linux/vmhgfs/file.c +++ b/open-vm-tools/modules/linux/vmhgfs/file.c @@ -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) { diff --git a/open-vm-tools/modules/linux/vmhgfs/fsutil.c b/open-vm-tools/modules/linux/vmhgfs/fsutil.c index e791df78d..0c5102bea 100644 --- a/open-vm-tools/modules/linux/vmhgfs/fsutil.c +++ b/open-vm-tools/modules/linux/vmhgfs/fsutil.c @@ -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; }