The declaration (and assignment) to size at the outermost scope
in the copyVnodes function is masked by a later declaration at a
inner scope.
Just remove the outer declaration to clarify what's happening.
Caught by clang-analyzer
Change-Id: If23bdcf8a4c2d23d6224762fecce35be9cf15873
Reviewed-on: http://gerrit.openafs.org/9168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
FdHandle_t *newfdP = 0;
struct VnodeClassInfo *vcp = &VnodeClassInfo[class];
struct VnodeExtract *e;
- afs_sfsize_t size;
afs_uint64 offset;
Inode ino, newino;
code = EIO;
goto Bad_Copy;
}
- size = FDH_SIZE(fdP);
for (i=0; i<length; i++) {
e = &list[i];
IHandle_t *h, *newh;
char buf2[SIZEOF_LARGEDISKVNODE];
struct VnodeDiskObject *vnode2 = (struct VnodeDiskObject *)&buf2;
- afs_uint64 newoffset;
+ afs_uint64 newoffset, size;
newoffset = vcp->diskSize;
if (FDH_PREAD(newfdP, vnode2, vcp->diskSize, newoffset) != vcp->diskSize) {