Print

Print


You missed the following:

src/XrdClient/XrdClient.cc: In member function 'virtual bool XrdClient::OpenFileWhenRedirected(char*, bool&)':
src/XrdClient/XrdClient.cc:1375:14: error: enum constant in boolean context [-Werror=int-in-bool-context]
  options &= !kXR_delete;
              ^~~~~~~~~~
src/XrdClient/XrdClient.cc:1383:14: error: enum constant in boolean context [-Werror=int-in-bool-context]
  options &= !kXR_new;
              ^~~~~~~

You are using boolean operation where you needed a bitwise operation.

src/XrdCl/XrdClZipArchiveReader.cc: In destructor 'XrdCl::ZipArchiveReaderImpl::~ZipArchiveReaderImpl()':
src/XrdCl/XrdClZipArchiveReader.cc:246:23: error: ignoring return value of 'XrdCl::XRootDStatus XrdCl::File::Close(uint16_t)', declared with attribute warn_unused_result [-Werror=unused-result]
       pArchive.Close();
                       ^
In file included from src/XrdCl/XrdClZipArchiveReader.cc:27:0:
src/XrdCl/XrdClFile.hh:121:20: note: declared here
       XRootDStatus Close( uint16_t timeout = 0 ) XRD_WARN_UNUSED_RESULT;
                    ^~~~~

I am not fully sure how to properly handle this inside ~ZipArchiveReaderImpl(). I know, that only saving return value (but not using it) already removed the error, but is not a right solution probably. Maybe dtor should be marked as noexcept(false) and should throw an exception/terminate.

Will check further. Now it compiles up to 71%.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@davidlt in #448: You missed the following:\r\n```\r\nsrc/XrdClient/XrdClient.cc: In member function 'virtual bool XrdClient::OpenFileWhenRedirected(char*, bool\u0026)':\r\nsrc/XrdClient/XrdClient.cc:1375:14: error: enum constant in boolean context [-Werror=int-in-bool-context]\r\n options \u0026= !kXR_delete;\r\n ^~~~~~~~~~\r\nsrc/XrdClient/XrdClient.cc:1383:14: error: enum constant in boolean context [-Werror=int-in-bool-context]\r\n options \u0026= !kXR_new;\r\n ^~~~~~~\r\n```\r\nYou are using boolean operation where you needed a bitwise operation.\r\n\r\n```\r\nsrc/XrdCl/XrdClZipArchiveReader.cc: In destructor 'XrdCl::ZipArchiveReaderImpl::~ZipArchiveReaderImpl()':\r\nsrc/XrdCl/XrdClZipArchiveReader.cc:246:23: error: ignoring return value of 'XrdCl::XRootDStatus XrdCl::File::Close(uint16_t)', declared with attribute warn_unused_result [-Werror=unused-result]\r\n pArchive.Close();\r\n ^\r\nIn file included from src/XrdCl/XrdClZipArchiveReader.cc:27:0:\r\nsrc/XrdCl/XrdClFile.hh:121:20: note: declared here\r\n XRootDStatus Close( uint16_t timeout = 0 ) XRD_WARN_UNUSED_RESULT;\r\n ^~~~~\r\n```\r\n\r\nI am not fully sure how to properly handle this inside `~ZipArchiveReaderImpl()`. I know, that only saving return value (but not using it) already removed the error, but is not a right solution probably. Maybe dtor should be marked as `noexcept(false)` and should throw an exception/terminate.\r\n\r\nWill check further. Now it compiles up to 71%."}],"action":{"name":"View Pull Request","url":"https://github.com/xrootd/xrootd/pull/448#issuecomment-272914148"}}}

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1