Skip to content

Commit

Permalink
Fix this round of unused variable to allow strict compilation.
Browse files Browse the repository at this point in the history
  • Loading branch information
abh3 committed Apr 5, 2013
1 parent e8ca5c2 commit ee998e6
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 43 deletions.
6 changes: 4 additions & 2 deletions src/XrdAcc/XrdAccAuthFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ int XrdAccAuthFile::Close()

int XrdAccAuthFile::getPP(char **path, char **priv)
{
char *pp, *bp;
// char *pp, *bp;
char *pp;

// If a record has not been read, return end of record (i.e., 0)
//
Expand All @@ -159,7 +160,8 @@ int XrdAccAuthFile::getPP(char **path, char **priv)

// Copy the value since the stream buffer might get overlaid.
//
bp = Copy(path_buff, pp, sizeof(path_buff)-1);
// bp = Copy(path_buff, pp, sizeof(path_buff)-1);
Copy(path_buff, pp, sizeof(path_buff)-1);
*path = path_buff;

// Check if this is really a path or a template
Expand Down
14 changes: 7 additions & 7 deletions src/XrdAcc/XrdAccConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int XrdAccConfig::ConfigDBrec(XrdSysError &Eroute,
User_ID = 'u',
No_ID = 0
};
char *authid, rtype, *atype, *path, *privs;
char *authid, rtype, *path, *privs;
int alluser = 0, anyuser = 0, domname = 0, NoGo = 0;
DB_RecType rectype;
XrdOucHash<XrdAccCapability> *hp;
Expand All @@ -542,20 +542,20 @@ int XrdAccConfig::ConfigDBrec(XrdSysError &Eroute,
// Set up to handle the particular record
//
switch(rectype)
{case Group_ID: hp = tabs.G_Hash; atype = (char *)"group";
{case Group_ID: hp = tabs.G_Hash;
gtype=XrdAccUnixGroup;
break;
case Host_ID: hp = tabs.H_Hash; atype = (char *)"host";
case Host_ID: hp = tabs.H_Hash;
domname = (authid[0] == '.');
break;
case Set_ID: hp = 0; atype = (char *)"set";
case Set_ID: hp = 0;
break;
case Netgrp_ID: hp = tabs.N_Hash; atype = (char *)"netgrp";
case Netgrp_ID: hp = tabs.N_Hash;
gtype=XrdAccNetGroup;
break;
case Template_ID: hp = tabs.T_Hash; atype = (char *)"template";
case Template_ID: hp = tabs.T_Hash;
break;
case User_ID: hp = tabs.U_Hash; atype = (char *)"user";
case User_ID: hp = tabs.U_Hash;
alluser = (authid[0] == '*' && !authid[1]);
anyuser = (authid[0] == '=' && !authid[1]);
break;
Expand Down
2 changes: 1 addition & 1 deletion src/XrdBwm/XrdBwmPolicy1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ int XrdBwmPolicy1::Dispatch(char *RespBuff, int RespSize)
{theQ[Xeq].Add(rP);
rID = rP->refID; *RespBuff = '\0';
pMutex.UnLock();
return refID;
return rID;
}
pMutex.UnLock();
pSem.Wait();
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCms/XrdCmsAdmin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,9 +339,9 @@ void XrdCmsAdmin::Relay(int setSock, int newSock)

void XrdCmsAdmin::Send(const char *Req, XrdCmsRRData &Data)
{
AdminReq *arP;
// AdminReq *arP;

if (AdminReq::numinQ < AdminReq::maxinQ) arP = new AdminReq(Req, Data);
if (AdminReq::numinQ < AdminReq::maxinQ) new AdminReq(Req, Data);
else Say.Emsg("Send", "Queue full; ignoring", Req, Data.Path);
}

Expand Down
2 changes: 1 addition & 1 deletion src/XrdCms/XrdCmsCluster.cc
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ int XrdCmsCluster::Broadsend(SMask_t Who, XrdCms::CmsRRHdr &Hdr,

// Run through the table looking for a node to send the message to
//
do{for (i = Beg; i <= STHi; i++)
do{for (i = Beg; i <= Fin; i++)
{if ((nP = NodeTab[i]) && nP->isNode(Who))
{nP->Lock();
STMutex.UnLock();
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCms/XrdCmsConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2417,7 +2417,7 @@ int XrdCmsConfig::xrole(XrdSysError *eDest, XrdOucStream &CFile)
{
XrdCmsRole::RoleID roleID;
char *val, *Tok1, *Tok2;
int rc, xMeta=0, xPeer=0, xProxy=0, xServ=0, xMan=0, xSolo=0, xSup=0;
int rc, xMeta=0, xPeer=0, xProxy=0, xServ=0, xMan=0, xSolo=0;

// Get the first token
//
Expand Down Expand Up @@ -2452,7 +2452,7 @@ int XrdCmsConfig::xrole(XrdSysError *eDest, XrdOucStream &CFile)
switch(roleID)
{case XrdCmsRole::MetaManager: xMeta = xMan = -1; break;
case XrdCmsRole::Manager: xMan = -1; break;
case XrdCmsRole::Supervisor: xSup = xMan = xServ = -1; break;
case XrdCmsRole::Supervisor: xMan = xServ = -1; break;
case XrdCmsRole::Server: xServ = -1; break;
case XrdCmsRole::ProxyManager: xProxy = xMan = -1; break;
case XrdCmsRole::ProxySuper: xProxy = xMan = xServ = -1; break;
Expand Down
4 changes: 2 additions & 2 deletions src/XrdCms/XrdCmsParser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ const char **nameVec() {return (const char **)PupNVec;}
XrdCmsParseInit(int mVal, ...)
{va_list ap;
int vp = mVal;
const char *Dummy;
// const char *Dummy;
memset(PupNVec, 0, sizeof(PupNVec));
va_start(ap, mVal);
do { if (vp < XrdCmsRRData::Arg_Count)
PupNVec[vp] = va_arg(ap, char *);
else Dummy = va_arg(ap, char *);
else va_arg(ap, char *);
} while((vp = va_arg(ap, int)));
va_end(ap);
}
Expand Down
3 changes: 1 addition & 2 deletions src/XrdCns/XrdCnsConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ int XrdCnsConfig::Configure()
XrdOucTokenizer mToks(0);
XrdNetSocket *EventSock;
pthread_t tid;
int n, retc, NoGo = 0;
int retc, NoGo = 0;
const char *iP;
char buff[2048], *dP, *tP, *eVar;

Expand Down Expand Up @@ -381,7 +381,6 @@ int XrdCnsConfig::Configure()
//
if ((eVar = getenv("XRDEXPORTS")) && *eVar)
{eVar = strdup(eVar); mToks.Attach(eVar); mToks.GetLine();
n = 9999;
while((dP = mToks.GetToken()))
{if (!LocalPath(dP, buff, sizeof(buff))) NoGo = 1;
else {Exports = new XrdOucTList(buff, strlen(buff), Exports);
Expand Down
2 changes: 2 additions & 0 deletions src/XrdCns/XrdCnsSsi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,10 @@ int XrdCnsSsi::Updt(const char *Host, const char *Path)
if ((iFD = open(oBuff, O_CREAT|O_TRUNC|O_WRONLY, AMode)) < 0)
{Say.M("Unable to create ", oBuff, "; ",
XrdOucUtils::eText(errno, iBuff, sizeof(iBuff)));
*lP = cSave;
return 8;
}
*lP = cSave;

// Create a TOD record based on the last TOD received
//
Expand Down
3 changes: 1 addition & 2 deletions src/XrdFfs/XrdFfsPosix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,15 +246,14 @@ void* XrdFfsPosix_x_deleteall(void *x)

int XrdFfsPosix_deleteall(const char *rdrurl, const char *path, uid_t user_uid, mode_t st_mode)
{
int i, nurls, res, rval;
int i, nurls, res;
char *newurls[XrdFfs_MAX_NUM_NODES];
int res_i[XrdFfs_MAX_NUM_NODES];
int errno_i[XrdFfs_MAX_NUM_NODES];
struct XrdFfsPosixX_deleteall_args args[XrdFfs_MAX_NUM_NODES];
struct XrdFfsQueueTasks *jobs[XrdFfs_MAX_NUM_NODES];

nurls = XrdFfsMisc_get_all_urls(rdrurl, newurls, XrdFfs_MAX_NUM_NODES);
if (nurls < 0) rval = -1;

for (i = 0; i < nurls; i++)
{
Expand Down
12 changes: 6 additions & 6 deletions src/XrdOfs/XrdOfs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ void XrdOfs::Unpersist(XrdOfsHandle *oh, int xcev)

char *XrdOfs::WaitTime(int stime, char *buff, int blen)
{
int mlen, hr, min, sec;
int hr, min, sec;

// Compute hours, minutes, and seconds
//
Expand All @@ -2265,17 +2265,17 @@ char *XrdOfs::WaitTime(int stime, char *buff, int blen)
// Now format the message based on time duration
//
if (!hr && !min)
mlen = snprintf(buff,blen,"%d second%s",sec,(sec > 1 ? "s" : ""));
snprintf(buff,blen,"%d second%s",sec,(sec > 1 ? "s" : ""));
else if (!hr)
{if (sec > 10) min++;
mlen = snprintf(buff,blen,"%d minute%s",min,(min > 1 ? "s" : ""));
snprintf(buff,blen,"%d minute%s",min,(min > 1 ? "s" : ""));
}
else {if (hr == 1)
if (min <= 30)
mlen = snprintf(buff,blen,"%d minutes",min+60);
else mlen = snprintf(buff,blen,"%d hour and %d minutes",hr,min);
snprintf(buff,blen,"%d minutes",min+60);
else snprintf(buff,blen,"%d hour and %d minutes",hr,min);
else {if (min > 30) hr++;
mlen = snprintf(buff,blen,"%d hours",hr);
snprintf(buff,blen,"%d hours",hr);
}
}

Expand Down
6 changes: 2 additions & 4 deletions src/XrdOss/XrdOssApi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,11 @@ int XrdOssSys::Chmod(const char *path, mode_t mode, XrdOucEnv *envP)
int XrdOssSys::Mkdir(const char *path, mode_t mode, int mkpath, XrdOucEnv *envP)
{
char actual_path[MAXPATHLEN+1], *local_path;
unsigned long long Popts, Hopts;
int retc;

// Make sure we can modify this path
//
Popts = Check_RO(Mkdir, Hopts, path, "create directory");
Check_RW(Mkdir, path, "create directory");

// Generate local path
//
Expand Down Expand Up @@ -409,13 +408,12 @@ int XrdOssSys::Truncate(const char *path, unsigned long long size,
{
struct stat statbuff;
char actual_path[MAXPATHLEN+1], *local_path;
unsigned long long Popts, Hopts;
long long oldsz;
int retc;

// Make sure we can modify this path
//
Popts = Check_RO(Truncate, Hopts, path, "truncate");
Check_RW(Truncate, path, "truncate");

// Generate local path
//
Expand Down
4 changes: 4 additions & 0 deletions src/XrdOss/XrdOssApi.hh
Original file line number Diff line number Diff line change
Expand Up @@ -371,4 +371,8 @@ int RenameLink3(char *cPath, char *old_path, char *new_path);
XRDEXP_REMOTE & (flags = PathOpts(path)); \
if (flags & XRDEXP_NOTRW) \
return OssEroute.Emsg(#act, -XRDOSS_E8005, opname, path)

#define Check_RW(act, path, opname) \
if (PathOpts(path) & XRDEXP_NOTRW) \
return OssEroute.Emsg(#act, -XRDOSS_E8005, opname, path)
#endif
6 changes: 3 additions & 3 deletions src/XrdSecsss/XrdSecProtocolsss.cc
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ int XrdSecProtocolsss::getCred(XrdOucErrInfo *einfo,
XrdSecsssKT::ktEnt decKey;
XrdSecsssRR_Data prData;
char *lidP = 0, *idP, *dP, *eodP, idType;
int lidSz, idSz, dLen;
int idSz, dLen;

// Decode the credentials
//
Expand All @@ -759,8 +759,8 @@ int XrdSecProtocolsss::getCred(XrdOucErrInfo *einfo,
|| !idP || *idP == '\0')
return Fatal(einfo, "getCred", EINVAL, "Invalid id string.");
switch(idType)
{case XrdSecsssRR_Data::theLgid: lidP = idP; lidSz = idSz; break;
case XrdSecsssRR_Data::theRand: break;
{case XrdSecsssRR_Data::theLgid: lidP = idP; break;
case XrdSecsssRR_Data::theRand: break;
default: return Fatal(einfo,"getCred",EINVAL,"Invalid id type.");
}
}
Expand Down
18 changes: 9 additions & 9 deletions src/XrdXrootd/XrdXrootdXeq.cc
Original file line number Diff line number Diff line change
Expand Up @@ -589,16 +589,16 @@ int XrdXrootdProtocol::do_Endsess()

int XrdXrootdProtocol::do_Getfile()
{
int gopts, buffsz;
// int gopts, buffsz;

// Keep Statistics
//
SI->Bump(SI->getfCnt);

// Unmarshall the data
//
gopts = int(ntohl(Request.getfile.options));
buffsz = int(ntohl(Request.getfile.buffsz));
// gopts = int(ntohl(Request.getfile.options));
// buffsz = int(ntohl(Request.getfile.buffsz));

return Response.Send(kXR_Unsupported, "getfile request is not supported");
}
Expand Down Expand Up @@ -975,7 +975,7 @@ int XrdXrootdProtocol::do_Open()
{
static XrdXrootdCallBack openCB("open file", XROOTD_MON_OPENR);
int fhandle;
int rc, mode, opts, openopts, mkpath = 0, doforce = 0, compchk = 0;
int rc, mode, opts, openopts, doforce = 0, compchk = 0;
int popt, retStat = 0;
const char *opaque;
char usage, ebuff[2048], opC;
Expand Down Expand Up @@ -1011,13 +1011,13 @@ int XrdXrootdProtocol::do_Open()
if (opts & kXR_replica) {*op++ = '+';
openopts |= SFS_O_REPLICA;
}
if (opts & kXR_mkdir) {*op++ = 'm'; mkpath = 1;
if (opts & kXR_mkdir) {*op++ = 'm';
mode |= SFS_O_MKPTH;
}
}
else if (opts & kXR_delete)
{openopts = SFS_O_TRUNC; *op++ = 'd'; opC = XROOTD_MON_OPENW;
if (opts & kXR_mkdir) {*op++ = 'm'; mkpath = 1;
if (opts & kXR_mkdir) {*op++ = 'm';
mode |= SFS_O_MKPTH;
}
}
Expand Down Expand Up @@ -1330,16 +1330,16 @@ int XrdXrootdProtocol::do_Protocol(int retRole)

int XrdXrootdProtocol::do_Putfile()
{
int popts, buffsz;
// int popts, buffsz;

// Keep Statistics
//
SI->Bump(SI->putfCnt);

// Unmarshall the data
//
popts = int(ntohl(Request.putfile.options));
buffsz = int(ntohl(Request.putfile.buffsz));
// popts = int(ntohl(Request.putfile.options));
// buffsz = int(ntohl(Request.putfile.buffsz));

return Response.Send(kXR_Unsupported, "putfile request is not supported");
}
Expand Down

0 comments on commit ee998e6

Please sign in to comment.