Bug 39346

Summary: telepathy-qt fails to build with clang
Product: Telepathy Reporter: Pawel Worach <pawel.worach>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: Patch (against a 0.8 release?)

Description Pawel Worach 2011-07-18 11:00:30 UTC
Building telepathy-qt4 0.7.1 with llvm/clang trunk r135391 on FreeBSD/amd64 results in:

n file included from /work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/optional-interface-factory.cpp:23:
In file included from /work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/OptionalInterfaceFactory:8:
/work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/optional-interface-factory.h:100:21: warning: parentheses were disambiguated as a function declarator
        QString name(QLatin1String(Interface::staticInterfaceName()));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/optional-interface-factory.h:100:47: error: parameter declarator cannot be qualified
        QString name(QLatin1String(Interface::staticInterfaceName()));
                                   ~~~~~~~~~~~^
/work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/optional-interface-factory.h:116:21: warning: parentheses were disambiguated as a function declarator
        QString name(QLatin1String(Interface::staticInterfaceName()));
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/work/a/ports/net-im/telepathy-qt4/work/telepathy-qt4-0.7.1/TelepathyQt4/optional-interface-factory.h:116:47: error: parameter declarator cannot be qualified
        QString name(QLatin1String(Interface::staticInterfaceName()));
                                   ~~~~~~~~~~~^
[ 48%] 2 warnings and 2 errors generated.
*** Error code 1
Comment 1 Thomas Flüeli 2012-01-16 03:53:19 UTC
The same errors occur with Visual Studio on Windows. Bug 31200 contains a (probably outdated) patch (attachment 39860 [details] [review]).
Comment 2 Olli Salli 2012-01-17 03:59:25 UTC
Created attachment 55669 [details] [review]
Patch (against a 0.8 release?)

I got this patch by email, please review, forward port to master as well, and integrate somebody?

--

Hello!

The attached patch fixes two instances of most vexing parse not caught by 
GCC (but caught by Clang).

Regards.
-- Alberto Villa, FreeBSD committer <avilla@FreeBSD.org> http://people.FreeBSD.org/~avilla Whatever occurs from love is always beyond good and evil. -- Friedrich Nietzsche
Comment 3 Andre Moreira Magalhaes 2012-02-14 07:38:02 UTC
Fixed upstream. It will be in tp-qt 0.9.1.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.