"warning: returning address of local temporary object" in qt5 #7915

issue laanwj opened this issue on April 20, 2016
  1. laanwj commented at 11:03 AM on April 20, 2016: member

    Not sure when this warning appeared, and I don't have time to persue this right now, but this seems like a serious issue upstream:

    In file included from qt/walletframe.cpp:5:
    In file included from ./qt/walletframe.h:9:
    In file included from /usr/include/qt5/QtCore/QMap:1:
    /usr/include/qt5/QtCore/qmap.h:620:27: warning: returning address of local temporary object [-Wreturn-stack-address]
        return n ? n->value : adefaultValue;
                              ^~~~~~~~~~~~~
    qt/walletframe.cpp:68:45: note: in instantiation of member function 'QMap<QString, WalletView *>::value' requested here
        WalletView *walletView = mapWalletViews.value(name);
                                                ^
    /usr/include/qt5/QtCore/qmap.h:389:44: note: binding reference variable 'adefaultValue' here
        const T value(const Key &key, const T &defaultValue = T()) const;
                                               ^              ~~~
    1 warning generated.
    

    This is Qt 5.2.1 on Ubuntu 14.04 so this may well be solved in newer versions.

  2. laanwj added the label GUI on Apr 20, 2016
  3. laanwj added the label Upstream on Apr 20, 2016
  4. laanwj commented at 12:03 PM on April 20, 2016: member

    NM, this is a known LLVM false positive: https://llvm.org/bugs/show_bug.cgi?id=26396

  5. laanwj closed this on Apr 20, 2016

  6. MarcoFalke locked this on Sep 8, 2021
Contributors

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me