From db844c458457a0bbcff81e9dbff362784db6958a Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 24 Mar 2009 22:36:09 +0000 Subject: [PATCH] vol-split-warnings-no-win-20090324 LICENSE IPL10 remove many warnings disable on Windows since there are missing dependencies in ntops.c --- src/volser/NTMakefile | 1 + src/volser/vol_split.c | 15 ++++++--------- src/volser/volprocs.c | 2 +- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/volser/NTMakefile b/src/volser/NTMakefile index 2b1e6fa93..61976cffb 100644 --- a/src/volser/NTMakefile +++ b/src/volser/NTMakefile @@ -90,6 +90,7 @@ VOLSERVER_EXEOBJS = \ $(OUT)\volmain.obj \ $(OUT)\volprocs.obj \ $(OUT)\voltrans.obj \ + $(OUT)\vol_split.obj \ $(OUT)\volserver.res diff --git a/src/volser/vol_split.c b/src/volser/vol_split.c index 1505ec0d4..d65a1429c 100644 --- a/src/volser/vol_split.c +++ b/src/volser/vol_split.c @@ -8,7 +8,7 @@ #include #include -#ifdef AFS_NAMEI_ENV +#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV) #include #include #ifdef AFS_PTHREAD_ENV @@ -92,7 +92,6 @@ ExtractVnodes(struct Msg *m, Volume *vol, afs_int32 class, struct VnodeExtract *e; afs_uint32 size; afs_uint32 offset; - afs_uint32 vN; *length = 0; if (parent) @@ -247,7 +246,6 @@ FindVnodes(struct Msg *m, afs_uint32 where, static afs_int32 copyDir(struct Msg *m, IHandle_t *inh, IHandle_t *outh) { - afs_int32 code; FdHandle_t *infdP, *outfdP; char *tbuf; afs_size_t size; @@ -325,7 +323,6 @@ afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol, afs_uint64 size; afs_uint64 offset; Inode ino, newino; - afs_uint32 newVn; fdP = IH_OPEN(vol->vnodeIndex[class].handle); if (!fdP) { @@ -364,8 +361,8 @@ afs_int32 copyVnodes(struct Msg *m, Volume *vol, Volume *newvol, FdHandle_t *infdP = 0; FdHandle_t *outfdP = 0; char *tbuf = malloc(2048); - Inode nearInode; #if defined(NEARINODE_HINT) + Inode nearInode; V_pref(vol,nearInode) #endif @@ -582,9 +579,9 @@ createMountpoint(Volume *vol, Volume *newvol, struct VnodeDiskObject *parent, return EIO; } FDH_SEEK(fdP2, 0, 0); - sprintf(&symlink, "#%s", V_name(newvol)); + sprintf(symlink, "#%s", V_name(newvol)); size = strlen(symlink) + 1; - if (FDH_WRITE(fdP2, &symlink, size) != size) { + if (FDH_WRITE(fdP2, symlink, size) != size) { Log("split volume: couldn't write mountpoint %u.%u.%u\n", V_id(vol), newvN, vnode.uniquifier); return EIO; @@ -684,7 +681,7 @@ deleteVnodes(Volume *vol, afs_int32 class, *blocks += (size + 0x3ff) >> 10; ino = VNDISK_GET_INO(vnode); if (ino) { - IHandle_t *h, *newh; + IHandle_t *h; IH_INIT(h, vol->device, V_parentId(vol), ino); IH_DEC(h, ino, V_parentId(vol)); #ifdef AFS_RXOSD_SUPPORT @@ -759,7 +756,7 @@ split_volume(struct rx_call *call, Volume *vol, Volume *newvol, rx_Write(m->call, m->line, strlen(m->line)); } code = findName(vol, parVnode, where, rootVnode->uniquifier, - &name, sizeof(name)); + name, sizeof(name)); if (code) { sprintf(m->line, "splitvolume: could'nt find name of %u in directory %u.%u.%u.\n", diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 55990f598..f14b5e29b 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -2922,7 +2922,7 @@ afs_int32 SAFSVolSplitVolume(struct rx_call *acall, afs_uint32 vid, afs_uint32 new, afs_uint32 where, afs_int32 verbose) { -#ifdef AFS_NAMEI_ENV +#if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV) afs_int32 code, code2; Volume *vol=0, *newvol=0; struct volser_trans *tt = 0, *tt2 = 0; -- 2.39.5