diff --git a/src/XrdCeph/XrdCephOss.cc b/src/XrdCeph/XrdCephOss.cc index 74f8f6e1978..1e3ce625bfc 100644 --- a/src/XrdCeph/XrdCephOss.cc +++ b/src/XrdCeph/XrdCephOss.cc @@ -70,7 +70,7 @@ extern "C" // set parameters try { ceph_posix_set_defaults(parms); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("CephOss loading failed with exception. Check the syntax of parameters : ", parms); return 0; } @@ -193,7 +193,7 @@ int XrdCephOss::Stat(const char* path, } else { return ceph_posix_stat(env, path, buff); } - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("stat : invalid syntax in file parameters"); return -EINVAL; } @@ -228,7 +228,7 @@ int XrdCephOss::Truncate (const char* path, XrdOucEnv* env) { try { return ceph_posix_truncate(env, path, size); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("truncate : invalid syntax in file parameters"); return -EINVAL; } @@ -237,7 +237,7 @@ int XrdCephOss::Truncate (const char* path, int XrdCephOss::Unlink(const char *path, int Opts, XrdOucEnv *env) { try { return ceph_posix_unlink(env, path); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("unlink : invalid syntax in file parameters"); return -EINVAL; } diff --git a/src/XrdCeph/XrdCephOssDir.cc b/src/XrdCeph/XrdCephOssDir.cc index b3ddacf8472..6743edc5e47 100644 --- a/src/XrdCeph/XrdCephOssDir.cc +++ b/src/XrdCeph/XrdCephOssDir.cc @@ -38,7 +38,7 @@ int XrdCephOssDir::Opendir(const char *path, XrdOucEnv &env) { return -errno; } return XrdOssOK; - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("opendir : invalid syntax in file parameters"); return -EINVAL; } diff --git a/src/XrdCeph/XrdCephOssFile.cc b/src/XrdCeph/XrdCephOssFile.cc index 5ebef097f2a..3a0a63f47c7 100644 --- a/src/XrdCeph/XrdCephOssFile.cc +++ b/src/XrdCeph/XrdCephOssFile.cc @@ -44,7 +44,7 @@ int XrdCephOssFile::Open(const char *path, int flags, mode_t mode, XrdOucEnv &en if (rc < 0) return rc; m_fd = rc; return XrdOssOK; - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephEroute.Say("open : invalid syntax in file parameters"); return -EINVAL; } diff --git a/src/XrdCeph/XrdCephXAttr.cc b/src/XrdCeph/XrdCephXAttr.cc index ec7af75a657..4c2f60a0f96 100644 --- a/src/XrdCeph/XrdCephXAttr.cc +++ b/src/XrdCeph/XrdCephXAttr.cc @@ -45,7 +45,7 @@ extern "C" // set parameters try { ceph_posix_set_defaults(parms); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephXattrEroute.Say("CephXattr loading failed with exception. Check the syntax of parameters : ", parms); return 0; } @@ -60,7 +60,7 @@ XrdCephXAttr::~XrdCephXAttr() {} int XrdCephXAttr::Del(const char *Aname, const char *Path, int fd) { try { return ceph_posix_removexattr(0, Path, Aname); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephXattrEroute.Say("Del : invalid syntax in file parameters", Path); return -EINVAL; } @@ -77,7 +77,7 @@ int XrdCephXAttr::Get(const char *Aname, void *Aval, int Avsz, } else { try { return ceph_posix_getxattr(0, Path, Aname, Aval, Avsz); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephXattrEroute.Say("Get : invalid syntax in file parameters", Path); return -EINVAL; } @@ -90,7 +90,7 @@ int XrdCephXAttr::List(AList **aPL, const char *Path, int fd, int getSz) { } else { try { return ceph_posix_listxattrs(0, Path, aPL, getSz); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephXattrEroute.Say("List : invalid syntax in file parameters", Path); return -EINVAL; } @@ -104,7 +104,7 @@ int XrdCephXAttr::Set(const char *Aname, const void *Aval, int Avsz, } else { try { return ceph_posix_setxattr(0, Path, Aname, Aval, Avsz, 0); - } catch (std::exception e) { + } catch (std::exception &e) { XrdCephXattrEroute.Say("Set : invalid syntax in file parameters", Path); return -EINVAL; } diff --git a/src/XrdCl/XrdClLocalFileHandler.cc b/src/XrdCl/XrdClLocalFileHandler.cc index 0dae790e16e..3fcb3ea8a25 100644 --- a/src/XrdCl/XrdClLocalFileHandler.cc +++ b/src/XrdCl/XrdClLocalFileHandler.cc @@ -692,8 +692,8 @@ namespace XrdCl pHostList.push_back( HostInfo( pUrl, false ) ); //All went well - uint8_t ufd = fd; - OpenInfo *openInfo = new OpenInfo( &ufd, 1, statInfo ); + uint32_t ufd = fd; + OpenInfo *openInfo = new OpenInfo( (uint8_t*)&ufd, 1, statInfo ); resp = new AnyObject(); resp->Set( openInfo ); return XRootDStatus();