[kde-freebsd] area51's sysutils/nepomuk-core fails with clang
Schaich Alonso
alonsoschaich at fastmail.fm
Wed Jan 9 19:23:04 UTC 2013
Reproducable on RELEASE-9.1, STABLE-9 with CLANG_IS_CC and CURRENT, all recent
versions.
It can be fixed by adding the parantheses as proposed by clang in the first
analysis output, and all others are followup errors.
While I still don't know why that is needed, it still is required for
clang-3.2. Of cause, removing the compilation of querytests from the
CMakeLists.txt also fixes the issue.
Alonso
Build output:
> Scanning dependencies of target querytests
> [ 86%] Building CXX object
> autotests/test/CMakeFiles/querytests.dir/querytests_automoc.o [ 87%]
> Building CXX object autotests/test/CMakeFiles/querytests.dir/querytests.o [
> 87%] Building CXX object
> [...]
> [... multiple make jobs ...]
> [...]
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/
> test/querytests.cpp:298:27: warning: parentheses were disambiguated as a
> function declarator [-Wvexing-parse]>
> Query::Query query( ResourceTypeTerm( NAO::Tag() ) );
>
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/t
> est/querytests.cpp:298:52: error: parameter declarator cannot be qualified>
> Query::Query query( ResourceTypeTerm( NAO::Tag() ) );
>
> ~~~~~^
>
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/t
> est/querytests.cpp:309:16: error: no matching function for call to
> 'fetchResults'>
> << fetchResults( query )
>
> ^~~~~~~~~~~~
>
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/t
> est/querytests.cpp:80:19: note: candidate function not viable: no known
> conversion from 'Query::Query (Nepomuk2::Query::ResourceTypeTerm ((*)()))'
> to 'const QString' for 1st argument;>
> QList<Result> fetchResults(const QString& query) {
>
> ^
>
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/t
> est/querytests.cpp:101:19: note: candidate function not viable: no known
> conversion from 'Query::Query (Nepomuk2::Query::ResourceTypeTerm ((*)()))'
> to 'const Query::Query' for 1st argument;>
> QList<Result> fetchResults( const Query::Query& query ) {
>
> ^
>
> [ 91%] Building CXX object
> services/backupsync/service/CMakeFiles/nepomukbackupsync.dir/backupmanagera
> daptor.cpp.o In file included from
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/
> test/querytests.cpp:21: In file included from
> /usr/obj/usr/ports/sysutils/nepomuk-core/work/nepomuk-core-4.9.5/autotests/
> test/querytests.h:24: In file included from
> /usr/local/include/qt4/QtCore/QObject:1:
> In file included from /usr/local/include/qt4/QtCore/qobject.h:50:
> /usr/local/include/qt4/QtCore/qlist.h:381:22: warning: source of this
> 'memcpy' call is a pointer to dynamic class 'const Soprano::Statement';
> vtable pointer will be copied [-Wdynamic-class-memaccess]>
> else ::memcpy(n, &t, sizeof(T));
>
> ~~~~~~~~ ^
>
> /usr/local/include/qt4/QtCore/qlist.h:512:13: note: in instantiation of
> member function 'QList<Soprano::Statement>::node_construct' requested here>
> node_construct(n, t);
> ^
>
> /usr/local/include/Soprano/../soprano/iterator.h:281:16: note: in
> instantiation of member function 'QList<Soprano::Statement>::append'
> requested here>
> sl.append( current() );
>
> ^
>
> /usr/local/include/Soprano/../soprano/statementiterator.h:104:51: note: in
> instantiation of member function
> 'Soprano::Iterator<Soprano::Statement>::allElements' requested here>
> QList<Statement> allStatements() { return allElements(); }
>
> ^
>
> /usr/local/include/qt4/QtCore/qlist.h:381:22: note: explicitly cast the
> pointer to silence this warning>
> else ::memcpy(n, &t, sizeof(T));
>
> ^
> (void*)
>
> 2 warnings and 2 errors generated.
> *** [autotests/test/CMakeFiles/querytests.dir/querytests.o] Error code 1
> 1 error
> *** [autotests/test/CMakeFiles/querytests.dir/all] Error code 2
More information about the kde-freebsd
mailing list