Skip to content

Commit

Permalink
[All] Fix: error: taking address of temporary array.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Jan 7, 2020
1 parent 0490e13 commit 37ede05
Show file tree
Hide file tree
Showing 19 changed files with 38 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/Xrd/XrdConfig.cc
Expand Up @@ -925,8 +925,8 @@ void XrdConfig::setCFG()
//
XrdOucStream::Capture(&totalCF);
totalCF.resize(1024*1024);
XrdOucStream::Capture((const char*[]){"*** ",myProg, " config from '",
cfnP, "':", 0});
static const char *cvec[] = { "*** ", myProg, " config from '", cfnP, "':", 0 };
XrdOucStream::Capture(cvec);
}

/******************************************************************************/
Expand Down
3 changes: 2 additions & 1 deletion src/XrdAcc/XrdAccConfig.cc
Expand Up @@ -275,7 +275,8 @@ int XrdAccConfig::ConfigFile(XrdSysError &Eroute, const char *ConfigFN) {
// Now start reading records until eof.
//
ConfigDefaults(); Config.Attach(cfgFD); Config.Tabs(0);
Config.Capture((const char*[]){"*** acc plugin config:",0});
static const char *cvec[] = { "*** acc plugin config:", 0 };
Config.Capture(cvec);

while((var = Config.GetMyFirstWord()))
{if (!strncmp(var, "acc.", 2))
Expand Down
3 changes: 2 additions & 1 deletion src/XrdBwm/XrdBwmConfig.cc
Expand Up @@ -106,7 +106,8 @@ int XrdBwm::Configure(XrdSysError &Eroute) {
return Eroute.Emsg("Config", errno, "open config file",
ConfigFN);
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** bwm ofs plugin config:",0});
static const char *cvec[] = { "*** bwm ofs plugin config:", 0 };
Config.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdCms/XrdCmsClientConfig.cc
Expand Up @@ -237,7 +237,8 @@ int XrdCmsClientConfig::ConfigProc(const char *ConfigFN)
return 1;
}
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** cms plugin config:",0});
static const char *cvec[] = { "*** cms plugin config:", 0 };
Config.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdDig/XrdDigConfig.cc
Expand Up @@ -402,7 +402,8 @@ bool XrdDigConfig::ConfigProc(const char *ConfigFN)
return 1;
}
cFile.Attach(cfgFD);
cFile.Capture((const char*[]){"*** digfs plugin config:",0});
static const char *cvec[] = { "*** digfs plugin config:", 0 };
cFile.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdFrc/XrdFrcProxy.cc
Expand Up @@ -277,7 +277,8 @@ int XrdFrcProxy::Init2(const char *ConfigFN)
return 1;
}
cfgFile.Attach(cfgFD);
cfgFile.Capture((const char*[]){"*** frm client plugin config:",0});
static const char *cvec[] = { "*** frm client plugin config:", 0 };
cfgFile.Capture(cvec);

// Now start reading records until eof looking for our directive
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdFrm/XrdFrmConfig.cc
Expand Up @@ -972,7 +972,8 @@ int XrdFrmConfig::ConfigProc()
return 1;
}
cfgFile.Attach(cfgFD); cFile = &cfgFile;
cfgFile.Capture((const char*[]){"*** frm server config:",0});
static const char *cvec[] = { "*** frm server config:", 0 };
cfgFile.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdHttp/XrdHttpProtocol.cc
Expand Up @@ -1060,7 +1060,8 @@ int XrdHttpProtocol::Config(const char *ConfigFN, XrdOucEnv *myEnv) {
if ((cfgFD = open(ConfigFN, O_RDONLY, 0)) < 0)
return eDest.Emsg("Config", errno, "open config file", ConfigFN);
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** http protocol config:",0});
static const char *cvec[] = { "*** http protocol config:", 0 };
Config.Capture(cvec);

// Process items
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdMacaroons/XrdMacaroonsConfigure.cc
Expand Up @@ -48,7 +48,8 @@ bool Handler::Config(const char *config, XrdOucEnv *env, XrdSysError *log,
return log->Emsg("Config", errno, "open config file", config);
}
config_obj.Attach(cfg_fd);
config_obj.Capture((const char*[]){"*** macaroons plugin config:",0});
static const char *cvec[] = { "*** macaroons plugin config:", 0 };
config_obj.Capture(cvec);

// Set default mask for logging.
log->setMsgMask(LogMask::Error | LogMask::Warning);
Expand Down
3 changes: 2 additions & 1 deletion src/XrdOfs/XrdOfsConfig.cc
Expand Up @@ -184,7 +184,8 @@ int XrdOfs::Configure(XrdSysError &Eroute, XrdOucEnv *EnvInfo) {
return Eroute.Emsg("Config", errno, "open config file",
ConfigFN);
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** ofs plugin config:",0});
static const char *cvec[] = {"*** ofs plugin config:",0};
Config.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdOss/XrdOssConfig.cc
Expand Up @@ -553,7 +553,8 @@ int XrdOssSys::ConfigProc(XrdSysError &Eroute)
return 1;
}
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** oss plugin config:",0});
static const char *cvec[] = { "*** oss plugin config:", 0 };
Config.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdPfc/XrdPfcConfiguration.cc
Expand Up @@ -171,7 +171,8 @@ bool Cache::Config(const char *config_filename, const char *parameters)
}

Config.Attach(fd);
Config.Capture((const char*[]){"*** pfc plugin config:",0});
static const char *cvec[] = { "*** pfc plugin config:", 0 };
Config.Capture(cvec);

// Obtain OFS configurator for OSS plugin.
XrdOfsConfigPI *ofsCfg = XrdOfsConfigPI::New(config_filename,&Config,&m_log,
Expand Down
3 changes: 2 additions & 1 deletion src/XrdPss/XrdPssConfig.cc
Expand Up @@ -308,7 +308,8 @@ int XrdPssSys::ConfigProc(const char *Cfn)
return 1;
}
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** pss (oss) plugin config:",0});
static const char *cvec[] = { "*** pss (oss) plugin config:", 0 };
Config.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdSec/XrdSecServer.cc
Expand Up @@ -502,7 +502,8 @@ int XrdSecServer::ConfigFile(const char *ConfigFN)
// Now start reading records until eof.
//
Config.Attach(cfgFD); Config.Tabs(0);
Config.Capture((const char*[]){"*** sec plugin config:",0});
static const char *cvec[] = { "*** sec plugin config:", 0 };
Config.Capture(cvec);
while((var = Config.GetMyFirstWord()))
{if (!strncmp(var, "sec.", 4))
{recs++;
Expand Down
3 changes: 2 additions & 1 deletion src/XrdSsi/XrdSsiLogging.cc
Expand Up @@ -81,7 +81,8 @@ void ConfigLog(const char *cFN)
return;
}
cStrm.Attach(cfgFD);
cStrm.Capture((const char*[]){"*** ssi logging plugin config:",0});
static const char *cvec[] = { "*** ssi logging plugin config:", 0 };
cStrm.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdSsi/XrdSsiSfsConfig.cc
Expand Up @@ -188,7 +188,8 @@ bool XrdSsiSfsConfig::Configure(const char *cFN)
return false;
}
cStrm.Attach(cfgFD);
cStrm.Capture((const char*[]){"*** ssi (sfs) plugin config:",0});
static const char *cvec[] = { "*** ssi (sfs) plugin config:", 0 };
cStrm.Capture(cvec);

// Now start reading records until eof.
//
Expand Down
3 changes: 2 additions & 1 deletion src/XrdThrottle/XrdThrottleFileSystemConfig.cc
Expand Up @@ -132,7 +132,8 @@ FileSystem::Configure(XrdSysError & log, XrdSfsFileSystem *native_fs)
return 1;
}
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** throttle (ofs) plugin config:",0});
static const char *cvec[] = { "*** throttle (ofs) plugin config:", 0 };
Config.Capture(cvec);

std::string fslib = OFS_NAME;

Expand Down
3 changes: 2 additions & 1 deletion src/XrdTpc/XrdTpcConfigure.cc
Expand Up @@ -112,7 +112,8 @@ bool TPCHandler::Configure(const char *configfn, XrdOucEnv *myEnv)
return false;
}
Config.Attach(cfgFD);
Config.Capture((const char*[]){"*** http tpc plugin config:",0});
static const char *cvec[] = { "*** http tpc plugin config:", 0 };
Config.Capture(cvec);
const char *val;
std::string path2, path1 = "default";
bool path1_alt = false, path2_alt = false;
Expand Down
3 changes: 2 additions & 1 deletion src/XrdXrootd/XrdXrootdConfig.cc
Expand Up @@ -516,7 +516,8 @@ int XrdXrootdProtocol::Config(const char *ConfigFN)

// Indicate what we are about to do in the capture stream
//
Config.Capture((const char*[]){"*** xroot protocol config:",0});
static const char *cvec[] = { "*** xroot protocol config:", 0 };
Config.Capture(cvec);

// Process items
//
Expand Down

0 comments on commit 37ede05

Please sign in to comment.