Re: OpenCOLLADA need a little c++ help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 29, 2023 at 8:26 AM Sam Varshavchik <mrsam@xxxxxxxxxxxxxxx> wrote:
Richard Shaw writes:

> error: possibly dangling reference to a temporary [-Werror=dangling-
> reference]
>   315 |                 const auto & parents = 
> dae.root().selectNodes("//*[@sid]/..");

The quickest solution is just add a pragma to shut it up.

> The code in question[2] is:
>   // InstanceWithExtra and other <instance_*> with "url" attribute
> const auto & instances = root().selectNodes(

Find where selectNodes() is defined. Add

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-reference"

before the definition, and

#pragma GCC diagnostic pop

after it.

That's what I ended up doing, it turns out there were structures like this in about 7 places in that file and several more in another, it just got through two before the build failed previously. I ended up using the approach for the whole file and then fixed a couple of #include <cstdint> since you don't get it for free anymore and the build completed.

Thanks!
Richard
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux