ubports / ubuntu-ui-toolkit

Moved to https://gitlab.com/ubports/core/lomiri-ui-toolkit
https://gitlab.com/ubports/core/lomiri-ui-toolkit
GNU Lesser General Public License v3.0
13 stars 21 forks source link

Several compilation warnings #23

Closed z3ntu closed 4 years ago

z3ntu commented 5 years ago

First warning:

ucurihandler.cpp: In constructor 'UCUriHandler::UCUriHandler()':
ucurihandler.cpp:78:73: error: missing sentinel in function call [-Werror=format=]
     char* path = nih_dbus_path(NULL, "", applicationId.constData(), NULL);
                                                                         ^

My proposed fix: 15f75fc4a5caf634e004736f50ff7239141cb608

Second warning:

plugin/uctestcase.cpp: In constructor 'UbuntuTestCase::UbuntuTestCase(const QString&, QQuickView::ResizeMode, bool, QWindow*)':
plugin/uctestcase.cpp:55:37: error: ignoring return value of 'bool QTest::qWaitForWindowExposed(QWindow*, int)', declared with attribute nodiscard [-Werror=unused-result]
         QTest::qWaitForWindowExposed(this);
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
In file included from /usr/include/QtTest/qtest.h:349,
                 from /usr/include/QtTest/QtTest:7,
                 from plugin/uctestcase.h:24,
                 from plugin/uctestcase.cpp:19:
/usr/include/QtTest/qtestsystem.h:134:42: note: declared here
     Q_REQUIRED_RESULT inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 5000)
                                          ^~~~~~~~~~~~~~~~~~~~~

There are likely more, but I don't know how to disable Werror (for now sed -i 's|warning_clean|warn_off|' "$builddir"/.qmake.conf worked in ignoring the warnings), so I couldn't check more.