Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly dangling reference to a temporary #661

Open
oneforall2 opened this issue May 29, 2023 · 4 comments
Open

possibly dangling reference to a temporary #661

oneforall2 opened this issue May 29, 2023 · 4 comments

Comments

@oneforall2
Copy link

/tmp/OpenCOLLADA-1.6.68/DAEValidator/library/src/Dae.cpp: In member function ‘virtual void opencollada::Dae::readFile(const std::string&)’:
/tmp/OpenCOLLADA-1.6.68/DAEValidator/library/src/Dae.cpp:79:30: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
79 | const auto & instances = root().selectNodes(
| ^~~~~~~~~
/tmp/OpenCOLLADA-1.6.68/DAEValidator/library/src/Dae.cpp:79:60: note: the temporary was destroyed at the end of the full expression ‘((opencollada::Dae*)this)->opencollada::Dae::.opencollada::XmlDoc::root().opencollada::XmlNode::selectNodes(std::operator+(__cxx11::basic_string<_CharT, _Traits, _Alloc>&&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&) with _CharT = char; _Traits = char_traits; _Alloc = allocator)’
79 | const auto & instances = root().selectNodes(
| ~~~~~~~~~~~~~~~~~~^
80 | xpath_all + Strings::instance_animation +
gcc 13.1.0

@hobbes1069
Copy link
Contributor

I've been seeing this on Fedora as well. Unfortunately there has been no activity upstream for some time. I'm concerned I'll have to remove OpenCOLLADA from Fedora.

@hobbes1069
Copy link
Contributor

I got some tips from the Fedora devel list and at least got it compiling. It just ignores the errors but that code hasn't change in ages and I don't have the knowledge to fix it properly.

https://src.fedoraproject.org/rpms/openCOLLADA/blob/rawhide/f/openCOLLADA-pragma.patch

@oneforall2
Copy link
Author

I used -Wno-error=dangling-reference for now. But would be nice to see it fixed :)

@oneforall2
Copy link
Author

Already had the missing includes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants