Error: SHELLCHECK_WARNING (CWE-140): [#def1] /etc/deepin/greeters.d/00-xrandr:11:12: warning[SC2207]: Prefer mapfile or read -a to split command output (or quote to avoid splitting). # 9| xinfo(){ # 10| local IFS=$'\n' # 11|-> XINFO=($(xrandr|egrep -o '^.* connected( primary)?')) # 12| } # 13| Error: SHELLCHECK_WARNING (CWE-140): [#def2] /etc/deepin/greeters.d/00-xrandr:17:14: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 15| if xinfo && ((${#XINFO[@]} == 2)); then # 16| # 假设第一行为主屏 # 17|-> primary=(${XINFO[0]}) # 18| second=(${XINFO[1]}) # 19| # 如果第二行输出含有 primary, 则交换 Error: SHELLCHECK_WARNING (CWE-140): [#def3] /etc/deepin/greeters.d/00-xrandr:18:13: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 16| # 假设第一行为主屏 # 17| primary=(${XINFO[0]}) # 18|-> second=(${XINFO[1]}) # 19| # 如果第二行输出含有 primary, 则交换 # 20| if ((${#second[@]} == 3)); then Error: SHELLCHECK_WARNING (CWE-140): [#def4] /etc/deepin/greeters.d/00-xrandr:21:18: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 19| # 如果第二行输出含有 primary, 则交换 # 20| if ((${#second[@]} == 3)); then # 21|-> primary=(${XINFO[1]}) # 22| second=(${XINFO[0]}) # 23| fi Error: SHELLCHECK_WARNING (CWE-140): [#def5] /etc/deepin/greeters.d/00-xrandr:22:17: warning[SC2206]: Quote to prevent word splitting/globbing, or split robustly with mapfile or read -a. # 20| if ((${#second[@]} == 3)); then # 21| primary=(${XINFO[1]}) # 22|-> second=(${XINFO[0]}) # 23| fi # 24| xrandr --output ${second[0]} --right-of ${primary[0]} --auto Error: COMPILER_WARNING (CWE-252): [#def6] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/libdde-auth/deepinauthframework.cpp: scope_hint: In member function ‘void DeepinAuthFramework::PAMAuthentication(const QString&)’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/libdde-auth/deepinauthframework.cpp:169:11: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ # 169 | system("xset dpms force on"); # | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ # 167| # 168| m_PAMAuthThread = 0; # 169|-> system("xset dpms force on"); # 170| } # 171| Error: COMPILER_WARNING (CWE-252): [#def7] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/libdde-auth/deepinauthframework.cpp: scope_hint: In lambda function deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/libdde-auth/deepinauthframework.cpp:397:19: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ # 397 | system("xset dpms force on"); # | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~ # 395| if (((AT_Face == flag || AT_Iris == flag) && AS_Success == state) # 396| || (AT_Fingerprint == flag && (AS_Failure == state || AS_Success == state))) { # 397|-> system("xset dpms force on"); # 398| } # 399| }); Error: COMPILER_WARNING (CWE-477): [#def8] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_module.cpp: scope_hint: In member function ‘void AuthModule::setAuthStateStyle(const QString&)’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_module.cpp:105:36: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 105 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(path); # | ^~~~~~~~~~~~ /usr/include/dtk5/DWidget/DHiDPIHelper:1: included_from: Included from here. deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_module.cpp:7: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 103| return; # 104| # 105|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(path); # 106| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 107| m_authStateLabel->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def9] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_module.cpp:105:48: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 105 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(path); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 103| return; # 104| # 105|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(path); # 106| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 107| m_authStateLabel->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def10] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_password.cpp: scope_hint: In member function ‘void AuthPassword::initUI()’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_password.cpp:75:36: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 75 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # | ^~~~~~~~~~~~ /usr/include/dtk5/DWidget/DHiDPIHelper:1: included_from: Included from here. deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_password.cpp:12: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 73| passwordLayout->setSpacing(5); # 74| /* 大小写状态 */ # 75|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # 76| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 77| m_capsLock->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def11] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_password.cpp:75:48: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 75 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 73| passwordLayout->setSpacing(5); # 74| /* 大小写状态 */ # 75|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # 76| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 77| m_capsLock->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def12] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_single.cpp: scope_hint: In member function ‘void AuthSingle::initUI()’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_single.cpp:79:36: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 79 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/caps_lock.svg"); # | ^~~~~~~~~~~~ /usr/include/dtk5/DWidget/DHiDPIHelper:1: included_from: Included from here. deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_single.cpp:12: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 77| passwordLayout->addStretch(1); # 78| /* 大小写状态 */ # 79|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/caps_lock.svg"); # 80| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 81| m_capsLock->setAccessibleName(QStringLiteral("CapsStateLabel")); Error: COMPILER_WARNING (CWE-477): [#def13] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_single.cpp:79:48: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 79 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/caps_lock.svg"); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 77| passwordLayout->addStretch(1); # 78| /* 大小写状态 */ # 79|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/caps_lock.svg"); # 80| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 81| m_capsLock->setAccessibleName(QStringLiteral("CapsStateLabel")); Error: COMPILER_WARNING (CWE-477): [#def14] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_ukey.cpp: scope_hint: In member function ‘void AuthUKey::initUI()’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_ukey.cpp:52:36: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 52 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # | ^~~~~~~~~~~~ /usr/include/dtk5/DWidget/DHiDPIHelper:1: included_from: Included from here. deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_ukey.cpp:10: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 50| UKeyLayout->addStretch(1); # 51| /* 大小写状态 */ # 52|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # 53| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 54| m_capsLock->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def15] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/session-widgets/auth_ukey.cpp:52:48: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 52 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 50| UKeyLayout->addStretch(1); # 51| /* 大小写状态 */ # 52|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(CAPS_LOCK); # 53| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 54| m_capsLock->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def16] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/systemmonitor.cpp: scope_hint: In member function ‘void SystemMonitor::initUI()’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/systemmonitor.cpp:35:37: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 35 | m_icon->setPixmap(DHiDPIHelper::loadNxPixmap(":/img/deepin-system-monitor.svg")); # | ^~~~~~~~~~~~ /usr/include/dtk5/DWidget/DHiDPIHelper:1: included_from: Included from here. deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/systemmonitor.cpp:11: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 33| mainLayout->setContentsMargins(10, 0, 10, 0); # 34| # 35|-> m_icon->setPixmap(DHiDPIHelper::loadNxPixmap(":/img/deepin-system-monitor.svg")); # 36| m_text->setText(tr("Start system monitor")); # 37| Error: COMPILER_WARNING (CWE-477): [#def17] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/systemmonitor.cpp:35:49: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 35 | m_icon->setPixmap(DHiDPIHelper::loadNxPixmap(":/img/deepin-system-monitor.svg")); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 33| mainLayout->setContentsMargins(10, 0, 10, 0); # 34| # 35|-> m_icon->setPixmap(DHiDPIHelper::loadNxPixmap(":/img/deepin-system-monitor.svg")); # 36| m_text->setText(tr("Start system monitor")); # 37| Error: COMPILER_WARNING (CWE-477): [#def18] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/userbutton.cpp: scope_hint: In member function ‘void UserButton::initUI()’ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/userbutton.cpp:76:36: warning[-Wdeprecated-declarations]: ‘DHiDPIHelper’ is deprecated # 76 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/select.svg"); # | ^~~~~~~~~~~~ deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/userbutton.cpp:10: included_from: Included from here. /usr/include/dtk5/DWidget/dhidpihelper.h:12:25: note: declared here # 12 | class Q_DECL_DEPRECATED DHiDPIHelper # | ^~~~~~~~~~~~ # 74| m_checkedMark = new QLabel; # 75| # 76|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/select.svg"); # 77| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 78| m_checkedMark->setPixmap(pixmap); Error: COMPILER_WARNING (CWE-477): [#def19] deepin-session-shell-6.0.21-build/dde-session-shell-6.0.21/src/widgets/userbutton.cpp:76:48: warning[-Wdeprecated-declarations]: ‘static QPixmap Dtk::Widget::DHiDPIHelper::loadNxPixmap(const QString&)’ is deprecated: Use Dtk::Gui::DIcon::loadNxPixmap # 76 | QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/select.svg"); # | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/dtk5/DWidget/dhidpihelper.h:15:77: note: declared here # 15 | Q_DECL_DEPRECATED_X("Use Dtk::Gui::DIcon::loadNxPixmap") static QPixmap loadNxPixmap(const QString &fileName); # | ^~~~~~~~~~~~ # 74| m_checkedMark = new QLabel; # 75| # 76|-> QPixmap pixmap = DHiDPIHelper::loadNxPixmap(":/misc/images/select.svg"); # 77| pixmap.setDevicePixelRatio(devicePixelRatioF()); # 78| m_checkedMark->setPixmap(pixmap);
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-149.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | deepin-session-shell-6.0.21-1.fc42 |
store-results-to | /tmp/tmpjz364o58/deepin-session-shell-6.0.21-1.fc42.tar.xz |
time-created | 2024-11-12 23:36:26 |
time-finished | 2024-11-12 23:42:29 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpjz364o58/deepin-session-shell-6.0.21-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpjz364o58/deepin-session-shell-6.0.21-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |