When we're building an inode fileserver, we use the nearInode hint.
The IH_CREATE macro just throws this hint away if we're building namei,
which leads to compiler warnings about set-but-unused variables. Just
flag nearInode as being potentially unused in order to suppress these
warnings.
Change-Id: I25022dc859974e9311e4530a9eeee8ab1d77c373
Reviewed-on: http://gerrit.openafs.org/4999
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
static int
CopyOnWrite(Vnode * targetptr, Volume * volptr, afs_foff_t off, afs_fsize_t len)
{
- Inode ino, nearInode;
+ Inode ino;
+ Inode nearInode AFS_UNUSED;
ssize_t rdlen;
ssize_t wrlen;
afs_fsize_t size;
Error errorCode = 0; /* Error code returned back */
Error temp;
Inode inode = 0;
- Inode nearInode; /* hint for inode allocation in solaris */
+ Inode nearInode AFS_UNUSED; /* hint for inode allocation in solaris */
afs_ino_str_t stmp;
if ((errorCode =
struct VolumeDiskHeader diskHeader;
IHandle_t *handle;
FdHandle_t *fdP;
- Inode nearInode = 0;
+ Inode nearInode AFS_UNUSED = 0;
char *part, *name;
struct stat st;
struct VolumeHeader tempHeader;
struct VnodeClassInfo *vcp;
IHandle_t *tmpH;
FdHandle_t *fdP;
- Inode nearInode;
+ Inode nearInode AFS_UNUSED;
afs_int32 critical = 0;
tag = iod_getc(iodp);
ino = VNDISK_GET_INO(vnode);
if (ino) {
IHandle_t *h, *newh;
- Inode nearInode;
+ Inode AFS_UNUSED nearInode;
#if defined(NEARINODE_HINT) && !defined(AFS_NAMEI_ENV)
V_pref(vol,nearInode)
#endif