cern-fts / davix

High-performance file management over WebDAV / HTTP
GNU Lesser General Public License v2.1
85 stars 36 forks source link

compiler error in document.h #130

Open maxaehle opened 2 weeks ago

maxaehle commented 2 weeks ago

When I try to compile davix as part of ROOT, I get the following error message related to document.h:319:

/..../root/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/..../root/build/builtins/davix/DAVIX-prefix/src/DAVIX/src/libs/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
  319 |     GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
      |                                                                           ~~~~~~~^~~~~~~~~~~~

I agree that the line looks strange, length is a const SizeType member and should not be assigned. Also, I wonder if the missing return statement could create bugs.

maxaehle commented 2 weeks ago

the error comes up with GCC 14.2.0, but not with GCC 8.5.0