sddm-0.21.0-4.fc41
List of Defects
Error: COMPILER_WARNING (CWE-477): [#def1]
sddm-0.21.0-build/sddm-0.21.0/src/helper/HelperApp.h:27: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/redhat-linux-build/src/helper/sddm-helper_autogen/EWIEGA46WW/moc_HelperApp.cpp:9: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/redhat-linux-build/src/helper/sddm-helper_autogen/mocs_compilation.cpp:7: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthMessages.h: scope_hint: In function ‘QDataStream& SDDM::operator<<(QDataStream&, const Request&)’
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthMessages.h:191:39: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList<SDDM::Prompt>; typename std::add_const<_Tp>::type = const QList<SDDM::Prompt>]’ is deprecated: Use std::as_const() instead.
# 191 | for(const Prompt &p : qAsConst(m.prompts)) {
# | ~~~~~~~~^~~~~~~~~~~
/usr/include/qt6/QtCore/qforeach.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qglobal.h:57: included_from: Included from here.
/usr/include/qt6/QtCore/qnamespace.h:12: included_from: Included from here.
/usr/include/qt6/QtCore/qobjectdefs.h:12: included_from: Included from here.
/usr/include/qt6/QtCore/qobject.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/QObject:1: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.h:24: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/auth/Auth.h:24: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/redhat-linux-build/src/helper/sddm-helper_autogen/FQWVTXS267/moc_Auth.cpp:9: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/redhat-linux-build/src/helper/sddm-helper_autogen/mocs_compilation.cpp:2: included_from: Included from here.
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 189| qint32 length = m.prompts.length();
# 190| s << length;
# 191|-> for(const Prompt &p : qAsConst(m.prompts)) {
# 192| s << p;
# 193| }
Error: COMPILER_WARNING (CWE-477): [#def2]
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp: scope_hint: In member function ‘void SDDM::AuthRequest::Private::responseChanged()’
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp:41:45: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<SDDM::AuthPrompt*>; typename std::add_const<_Tp>::type = const QList<SDDM::AuthPrompt*>]’ is deprecated: Use std::as_const() instead.
# 41 | for(const AuthPrompt *qap : qAsConst(prompts)) {
# | ~~~~~~~~^~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 39|
# 40| void AuthRequest::Private::responseChanged() {
# 41|-> for(const AuthPrompt *qap : qAsConst(prompts)) {
# 42| if (qap->response().isEmpty())
# 43| return;
Error: COMPILER_WARNING (CWE-477): [#def3]
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp: scope_hint: In member function ‘void SDDM::AuthRequest::setRequest(const SDDM::Request*)’
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp:57:44: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QList<SDDM::Prompt>; typename std::add_const<_Tp>::type = const QList<SDDM::Prompt>]’ is deprecated: Use std::as_const() instead.
# 57 | for (const Prompt& p : qAsConst(request->prompts)) {
# | ~~~~~~~~^~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 55| d->prompts.clear();
# 56| if (request != nullptr) {
# 57|-> for (const Prompt& p : qAsConst(request->prompts)) {
# 58| AuthPrompt *qap = new AuthPrompt(&p, this);
# 59| d->prompts << qap;
Error: COMPILER_WARNING (CWE-477): [#def4]
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp: scope_hint: In member function ‘SDDM::Request SDDM::AuthRequest::request() const’
sddm-0.21.0-build/sddm-0.21.0/src/auth/AuthRequest.cpp:99:46: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<SDDM::AuthPrompt*>; typename std::add_const<_Tp>::type = const QList<SDDM::AuthPrompt*>]’ is deprecated: Use std::as_const() instead.
# 99 | for (const AuthPrompt* qap : qAsConst(d->prompts)) {
# | ~~~~~~~~^~~~~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 97| Request AuthRequest::request() const {
# 98| Request r;
# 99|-> for (const AuthPrompt* qap : qAsConst(d->prompts)) {
# 100| Prompt p;
# 101| p.hidden = qap->hidden();
Error: COMPILER_WARNING (CWE-477): [#def5]
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp: scope_hint: In member function ‘void SDDM::ConfigBase::load()’
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp:185:48: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead.
# 185 | for (const QString &filepath : qAsConst(files)) {
# | ~~~~~~~~^~~~~~~
/usr/include/qt6/QtCore/qforeach.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qglobal.h:57: included_from: Included from here.
/usr/include/qt6/QtCore/qchar.h:7: included_from: Included from here.
/usr/include/qt6/QtCore/qstring.h:14: included_from: Included from here.
/usr/include/qt6/QtCore/QString:1: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.h:24: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp:21: included_from: Included from here.
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 183| m_fileModificationTime = latestModificationTime;
# 184|
# 185|-> for (const QString &filepath : qAsConst(files)) {
# 186| loadInternal(filepath);
# 187| }
Error: COMPILER_WARNING (CWE-477): [#def6]
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp: scope_hint: In member function ‘void SDDM::ConfigBase::save(const SDDM::ConfigSection*, const SDDM::ConfigEntryBase*)’
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp:248:57: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QMap<QString, SDDM::ConfigEntryBase*>; typename std::add_const<_Tp>::type = const QMap<QString, SDDM::ConfigEntryBase*>]’ is deprecated: Use std::as_const() instead.
# 248 | for (const ConfigEntryBase *b : qAsConst(section->entries()))
# | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 246| remainingEntries.insert(section, entry);
# 247| else {
# 248|-> for (const ConfigEntryBase *b : qAsConst(section->entries()))
# 249| if (!b->matchesDefault())
# 250| remainingEntries.insert(section, b);
Error: COMPILER_WARNING (CWE-477): [#def7]
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp:254:51: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QMap<QString, SDDM::ConfigSection*>; typename std::add_const<_Tp>::type = const QMap<QString, SDDM::ConfigSection*>]’ is deprecated: Use std::as_const() instead.
# 254 | for (const ConfigSection *s : qAsConst(m_sections)) {
# | ~~~~~~~~^~~~~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 252| }
# 253| else {
# 254|-> for (const ConfigSection *s : qAsConst(m_sections)) {
# 255| for (const ConfigEntryBase *b : qAsConst(s->entries()))
# 256| if (!b->matchesDefault())
Error: COMPILER_WARNING (CWE-477): [#def8]
sddm-0.21.0-build/sddm-0.21.0/src/common/ConfigReader.cpp:255:57: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = const QMap<QString, SDDM::ConfigEntryBase*>; typename std::add_const<_Tp>::type = const QMap<QString, SDDM::ConfigEntryBase*>]’ is deprecated: Use std::as_const() instead.
# 255 | for (const ConfigEntryBase *b : qAsConst(s->entries()))
# | ~~~~~~~~^~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 253| else {
# 254| for (const ConfigSection *s : qAsConst(m_sections)) {
# 255|-> for (const ConfigEntryBase *b : qAsConst(s->entries()))
# 256| if (!b->matchesDefault())
# 257| remainingEntries.insert(s, b);
Error: COMPILER_WARNING (CWE-477): [#def9]
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.cpp: scope_hint: In member function ‘void SDDM::Session::setTo(Type, const QString&)’
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.cpp:209:40: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead.
# 209 | for (const auto &path: qAsConst(sessionDirs)) {
# | ~~~~~~~~^~~~~~~~~~~~~
/usr/include/qt6/QtCore/qforeach.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qglobal.h:57: included_from: Included from here.
/usr/include/qt6/QtCore/qiodevice.h:7: included_from: Included from here.
/usr/include/qt6/QtCore/qfiledevice.h:7: included_from: Included from here.
/usr/include/qt6/QtCore/qfile.h:8: included_from: Included from here.
/usr/include/qt6/QtCore/QFile:1: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.cpp:21: included_from: Included from here.
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 207|
# 208| QFile file;
# 209|-> for (const auto &path: qAsConst(sessionDirs)) {
# 210| m_dir.setPath(path);
# 211| m_fileName = m_dir.absoluteFilePath(fileName);
Error: COMPILER_WARNING (CWE-477): [#def10]
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.cpp: scope_hint: In lambda function
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.cpp:237:43: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead.
# 237 | for (QString locale : qAsConst(locales)) {
# | ~~~~~~~~^~~~~~~~~
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 235|
# 236| auto localizedValue = [&] (const QLatin1String &key) {
# 237|-> for (QString locale : qAsConst(locales)) {
# 238| QString localizedValue = settings.value(key + QLatin1Char('[') + locale + QLatin1Char(']'), QString()).toString();
# 239| if (!localizedValue.isEmpty()) {
Error: CLANG_WARNING: [#def11]
sddm-0.21.0-build/sddm-0.21.0/src/daemon/SeatManager.cpp:74:5: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'watcher'
# 72| }
# 73| });
# 74|-> }
# 75|
# 76| bool LogindSeat::canGraphical() const
Error: COMPILER_WARNING (CWE-477): [#def12]
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.cpp: scope_hint: In member function ‘void SDDM::GreeterApp::activatePrimary()’
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.cpp:291:41: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QQuickView*>; typename std::add_const<_Tp>::type = const QList<QQuickView*>]’ is deprecated: Use std::as_const() instead.
# 291 | for (QQuickView *view : qAsConst(m_views)) {
# | ~~~~~~~~^~~~~~~~~
/usr/include/qt6/QtCore/qforeach.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qglobal.h:57: included_from: Included from here.
/usr/include/qt6/QtCore/qnamespace.h:12: included_from: Included from here.
/usr/include/qt6/QtCore/qobjectdefs.h:12: included_from: Included from here.
/usr/include/qt6/QtCore/qobject.h:10: included_from: Included from here.
/usr/include/qt6/QtCore/QObject:1: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.h:24: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.cpp:21: included_from: Included from here.
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 289| void GreeterApp::activatePrimary() {
# 290| // activate and give focus to the window assigned to the primary screen
# 291|-> for (QQuickView *view : qAsConst(m_views)) {
# 292| if (view->screen() == QGuiApplication::primaryScreen()) {
# 293| view->requestActivate();
Error: COMPILER_WARNING (CWE-477): [#def13]
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.cpp: scope_hint: In function ‘int main(int, char**)’
sddm-0.21.0-build/sddm-0.21.0/src/greeter/GreeterApp.cpp:337:43: warning[-Wdeprecated-declarations]: ‘Qt::AA_EnableHighDpiScaling’ is deprecated: High-DPI scaling is always enabled. This attribute no longer has any effect.
# 337 | QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
# | ^~~~~~~~~~~~~~~~~~~~~~~
/usr/include/qt6/QtCore/qnamespace.h:449:9: note: declared here
# 449 | AA_EnableHighDpiScaling Q_DECL_ENUMERATOR_DEPRECATED_X(
# | ^~~~~~~~~~~~~~~~~~~~~~~
# 335| if (hiDpiEnabled) {
# 336| qDebug() << "High-DPI autoscaling Enabled";
# 337|-> QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
# 338| } else {
# 339| qDebug() << "High-DPI autoscaling not Enabled";
Error: COMPILER_WARNING (CWE-477): [#def14]
sddm-0.21.0-build/sddm-0.21.0/src/greeter/SessionModel.cpp: scope_hint: In member function ‘void SDDM::SessionModel::populate(SDDM::Session::Type, const QStringList&)’
sddm-0.21.0-build/sddm-0.21.0/src/greeter/SessionModel.cpp:138:38: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<QString>; typename std::add_const<_Tp>::type = const QList<QString>]’ is deprecated: Use std::as_const() instead.
# 138 | for (auto& session : qAsConst(sessions)) {
# | ~~~~~~~~^~~~~~~~~~
/usr/include/qt6/QtCore/qforeach.h:11: included_from: Included from here.
/usr/include/qt6/QtCore/qglobal.h:57: included_from: Included from here.
/usr/include/qt6/QtCore/qscopedpointer.h:7: included_from: Included from here.
/usr/include/qt6/QtCore/qdatastream.h:7: included_from: Included from here.
/usr/include/qt6/QtCore/QDataStream:1: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/common/Session.h:23: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/greeter/SessionModel.h:24: included_from: Included from here.
sddm-0.21.0-build/sddm-0.21.0/src/greeter/SessionModel.cpp:21: included_from: Included from here.
/usr/include/qt6/QtCore/qttypetraits.h:33:45: note: declared here
# 33 | constexpr typename std::add_const<T>::type &qAsConst(T &t) noexcept { return t; }
# | ^~~~~~~~
# 136| // read session
# 137| sessions.removeDuplicates();
# 138|-> for (auto& session : qAsConst(sessions)) {
# 139| Session *si = new Session(type, session);
# 140| bool execAllowed = true;
Error: CLANG_WARNING: [#def15]
sddm-0.21.0-build/sddm-0.21.0/src/helper/HelperApp.cpp:114:14: warning[deadcode.DeadStores]: Although the value stored to 'pos' is used in the enclosing expression, the value is never actually read from 'pos'
# 112| }
# 113|
# 114|-> if ((pos = args.indexOf(QStringLiteral("--autologin"))) >= 0) {
# 115| m_backend->setAutologin(true);
# 116| }
Error: CLANG_WARNING: [#def16]
sddm-0.21.0-build/sddm-0.21.0/src/helper/HelperApp.cpp:118:14: warning[deadcode.DeadStores]: Although the value stored to 'pos' is used in the enclosing expression, the value is never actually read from 'pos'
# 116| }
# 117|
# 118|-> if ((pos = args.indexOf(QStringLiteral("--greeter"))) >= 0) {
# 119| m_backend->setGreeter(true);
# 120| }
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-47.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | sddm-0.21.0-4.fc41 |
store-results-to | /tmp/tmp5opj2mf6/sddm-0.21.0-4.fc41.tar.xz |
time-created | 2024-07-03 17:59:44 |
time-finished | 2024-07-03 18:02:53 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmp5opj2mf6/sddm-0.21.0-4.fc41.tar.xz' '--gcc-analyze' '/tmp/tmp5opj2mf6/sddm-0.21.0-4.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |