Fixed defects

List of Defects

Error: COMPILER_WARNING (CWE-477): [#def1]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp: scope_hint: In member function ‘void PulseAudioQt::CardPrivate::update(const pa_card_info*)’
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp:51:43: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::Profile*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::Profile*>]’ is deprecated: Use std::as_const() instead.
#   51 |     for (const Profile *profile : qAsConst(m_profiles)) {
#      |                                   ~~~~~~~~^~~~~~~~~~~~
/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.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/pulseobject.h:10: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/profile.h:11: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/port.h:10: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/cardport.h:9: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.h:10: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp:7: 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; }
#      |                                             ^~~~~~~~
#   49|       QStringList existingProfiles;
#   50|   
#   51|->     for (const Profile *profile : qAsConst(m_profiles)) {
#   52|           existingProfiles << profile->name();
#   53|       }

Error: COMPILER_WARNING (CWE-477): [#def2]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp:78:37: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::Profile*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::Profile*>]’ is deprecated: Use std::as_const() instead.
#   78 |     for (Profile *profile : qAsConst(m_profiles)) {
#      |                             ~~~~~~~~^~~~~~~~~~~~
/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; }
#      |                                             ^~~~~~~~
#   76|       }
#   77|   
#   78|->     for (Profile *profile : qAsConst(m_profiles)) {
#   79|           if (info->active_profile2->name == profile->name()) {
#   80|               m_activeProfileIndex = m_profiles.indexOf(profile);

Error: COMPILER_WARNING (CWE-477): [#def3]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp:90:37: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::CardPort*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::CardPort*>]’ is deprecated: Use std::as_const() instead.
#   90 |     for (const Port *port : qAsConst(m_ports)) {
#      |                             ~~~~~~~~^~~~~~~~~
/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; }
#      |                                             ^~~~~~~~
#   88|       QStringList existingPorts;
#   89|   
#   90|->     for (const Port *port : qAsConst(m_ports)) {
#   91|           existingPorts << port->name();
#   92|       }

Error: COMPILER_WARNING (CWE-477): [#def4]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/card.cpp:106:35: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::CardPort*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::CardPort*>]’ is deprecated: Use std::as_const() instead.
#  106 |     for (CardPort *port : qAsConst(m_ports)) {
#      |                           ~~~~~~~~^~~~~~~~~
/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; }
#      |                                             ^~~~~~~~
#  104|       }
#  105|   
#  106|->     for (CardPort *port : qAsConst(m_ports)) {
#  107|           if (!newPorts.contains(port->name())) {
#  108|               m_ports.removeOne(port);

Error: COMPILER_WARNING (CWE-477): [#def5]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device.cpp:8: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device_p.h: scope_hint: In member function ‘void PulseAudioQt::DevicePrivate::updateDevice(const PAInfo*)’
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device_p.h:63:41: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::Port*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::Port*>]’ is deprecated: Use std::as_const() instead.
#   63 |         for (const Port *port : qAsConst(m_ports)) {
#      |                                 ~~~~~~~~^~~~~~~~~
/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.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device.h:10: included_from: Included from here.
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device.cpp:7: 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; }
#      |                                             ^~~~~~~~
#   61|   
#   62|           // Build list of existing ports
#   63|->         for (const Port *port : qAsConst(m_ports)) {
#   64|               existingPorts << port->name();
#   65|           }

Error: COMPILER_WARNING (CWE-477): [#def6]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device_p.h:85:35: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::Port*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::Port*>]’ is deprecated: Use std::as_const() instead.
#   85 |         for (Port *port : qAsConst(m_ports)) {
#      |                           ~~~~~~~~^~~~~~~~~
/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; }
#      |                                             ^~~~~~~~
#   83|   
#   84|           // Remove ports that are not in the updated port list
#   85|->         for (Port *port : qAsConst(m_ports)) {
#   86|               if (!newPorts.contains(port->name())) {
#   87|                   m_ports.removeOne(port);

Error: COMPILER_WARNING (CWE-477): [#def7]
pulseaudio-qt-1.4.0-build/pulseaudio-qt-1.4.0/src/device_p.h:93:35: warning[-Wdeprecated-declarations]: ‘constexpr typename std::add_const<_Tp>::type& qAsConst(T&) [with T = QList<PulseAudioQt::Port*>; typename std::add_const<_Tp>::type = const QList<PulseAudioQt::Port*>]’ is deprecated: Use std::as_const() instead.
#   93 |         for (Port *port : qAsConst(m_ports)) {
#      |                           ~~~~~~~~^~~~~~~~~
/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; }
#      |                                             ^~~~~~~~
#   91|   
#   92|           // Set active port
#   93|->         for (Port *port : qAsConst(m_ports)) {
#   94|               if (info->active_port->name == port->name()) {
#   95|                   m_activePortIndex = m_ports.indexOf(port);

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-182.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namepulseaudio-qt-1.5.0-1.fc41
diffbase-store-results-to/tmp/tmprzez3uyl/pulseaudio-qt-1.5.0-1.fc41.tar.xz
diffbase-time-created2024-07-03 17:04:31
diffbase-time-finished2024-07-03 17:06:27
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmprzez3uyl/pulseaudio-qt-1.5.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmprzez3uyl/pulseaudio-qt-1.5.0-1.fc41.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-182.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namepulseaudio-qt-1.4.0-4.fc40
store-results-to/tmp/tmpw46ba5x6/pulseaudio-qt-1.4.0-4.fc40.tar.xz
time-created2024-07-03 17:01:48
time-finished2024-07-03 17:04:15
titleFixed defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpw46ba5x6/pulseaudio-qt-1.4.0-4.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpw46ba5x6/pulseaudio-qt-1.4.0-4.fc40.src.rpm'
tool-versioncsmock-3.5.3-1.el9