Bug 456366 - PVS-Studio issues
Summary: PVS-Studio issues
Status: RESOLVED NOT A BUG
Alias: None
Product: Elisa
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Matthieu Gallien
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-05 20:01 UTC by Marius P
Modified: 2023-10-11 16:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marius P 2022-07-05 20:01:21 UTC
STEPS TO REPRODUCE
I have Kubuntu 22.04. I have installed Qt5 using kdesrc-build.
Pseudocode:
git commit ddb53c4a3b03e8a481d8bf02b95930d558e82fc3
rm -rf /home/n/kde/build-pvs/multimedia/elisa
mkdir -p /home/n/kde/build-pvs/multimedia/elisa && cd /home/n/kde/build-pvs/multimedia/elisa

export CMAKE_PREFIX_PATH=/home/n/kde/qt5:/home/n/kde/usr
export XDG_DATA_DIRS=/home/n/kde/usr/share:/usr/share/plasma:/usr/local/share:/usr/share:/var/lib/snapd/desktop
export PKG_CONFIG_PATH=/home/n/kde/usr/lib/pkgconfig:/home/n/kde/qt5/lib/pkgconfig
export PATH=/home/n/kde/usr/bin:/home/n/kde/qt5/bin:/home/n/kde/src/kdesrc-build:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
export CMAKE_MODULE_PATH=/home/n/kde/qt5/lib/cmake:/home/n/kde/usr/lib64/cmake:/home/n/kde/usr/lib/cmake
export LD_LIBRARY_PATH=/home/n/kde/usr/lib:/home/n/kde/qt5/lib

cmake -B . -S /home/n/kde/src/multimedia/elisa -G Unix\ Makefiles -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS:STRING=-pipe -DCMAKE_INSTALL_PREFIX=/home/n/kde/usr -DCMAKE_PREFIX_PATH=/home/n/kde/qt5

pvs-studio-analyzer trace -- make -j 16
pvs-studio-analyzer analyze -j 16 -o PVS-Studio.log
plog-converter -a GA:1,2 -d V567,V1042,V1053,V1044 -t tasklist -o report.tasks PVS-Studio.log

OBSERVED RESULT

The file report.tasks can be opened with Qt Creator. File > Open File or Project. It will be shown in the "Issues" Output Pane (Alt+1).

Below is the file report.tasks:

pvs-studio.com/en/docs/warnings/	1	err	Help: The documentation for all analyzer warnings is available here: https://pvs-studio.com/en/docs/warnings/.
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_abstractfilelisting.cpp	176	warn	V1037 Two or more case-branches perform the same actions. Check lines: 176, 190
/home/n/kde/src/multimedia/elisa/src/audiowrapper_libvlc.cpp	513	err	V674 The '0.01' literal of the 'double' type is compared to a value of the 'int' type.
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_elisaapplication.cpp	380	warn	V1037 Two or more case-branches perform the same actions. Check lines: 380, 387, 394
/home/n/kde/src/multimedia/elisa/src/elisaapplication.cpp	66	err	V730 Not all members of a class are initialized inside the constructor. Consider inspecting: mSchemes.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	1186	err	V523 The 'then' statement is equivalent to the subsequent code fragment.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6879	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6884	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6889	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6894	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6898	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6905	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6909	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6913	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6917	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6921	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6925	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6929	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.cpp	6933	warn	V560 A part of conditional expression is always true: isSameTrack.
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_databaseinterface.cpp	278	warn	V1037 Two or more case-branches perform the same actions. Check lines: 278, 320
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_databaseinterface.cpp	299	warn	V1037 Two or more case-branches perform the same actions. Check lines: 299, 306, 313
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_databaseinterface.cpp	250	warn	V1037 Two or more case-branches perform the same actions. Check lines: 250, 257, 264
/home/n/kde/src/multimedia/elisa/src/databaseinterface.h	172	warn	V1071 Consider inspecting the 'finishTransaction' function. The return value is not always used. Total calls: 34, discarded results: 1.
/home/n/kde/src/multimedia/elisa/src/models/filebrowsermodel.cpp	91	warn	V1037 Two or more case-branches perform the same actions. Check lines: 91, 145
/home/n/kde/src/multimedia/elisa/src/models/editabletrackmetadatamodel.cpp	36	warn	V1037 Two or more case-branches perform the same actions. Check lines: 36, 49
/home/n/kde/src/multimedia/elisa/src/models/editabletrackmetadatamodel.cpp	27	warn	V719 The switch statement does not cover all values of the 'ColumnsRoles' enum: HasChildrenRole.
/home/n/kde/src/multimedia/elisa/src/models/editabletrackmetadatamodel.cpp	144	warn	V719 The switch statement does not cover all values of the 'ColumnsRoles' enum: HasChildrenRole.
/home/n/kde/src/multimedia/elisa/src/models/editabletrackmetadatamodel.cpp	355	warn	V560 A part of conditional expression is always true: newValidState.
/home/n/kde/src/multimedia/elisa/src/mediaplaylist.cpp	189	warn	V1037 Two or more case-branches perform the same actions. Check lines: 189, 198
/home/n/kde/src/multimedia/elisa/src/mediaplaylist.cpp	171	warn	V1037 Two or more case-branches perform the same actions. Check lines: 171, 192
/home/n/kde/src/multimedia/elisa/src/mediaplaylist.cpp	177	warn	V1037 Two or more case-branches perform the same actions. Check lines: 177, 180
/home/n/kde/build-pvs/multimedia/elisa/src/elisaLib_autogen/include/moc_mediaplaylist.cpp	295	warn	V1037 Two or more case-branches perform the same actions. Check lines: 295, 309
/home/n/kde/src/multimedia/elisa/src/mediaplaylistproxymodel.cpp	23	warn	V730 Not all members of a class are initialized inside the compiler generated constructor. Consider inspecting: mPlayListModel.
/home/n/kde/src/multimedia/elisa/src/models/filebrowserproxymodel.cpp	17	warn	V730 Not all members of a class are initialized inside the constructor. Consider inspecting: mEnqueueMode, mTriggerPlay.
/home/n/kde/src/multimedia/elisa/src/models/trackmetadatamodel.cpp	114	warn	V719 The switch statement does not cover all values of the 'ColumnsRoles' enum: HasChildrenRole.
/home/n/kde/src/multimedia/elisa/src/models/trackmetadatamodel.cpp	157	warn	V1037 Two or more case-branches perform the same actions. Check lines: 157, 175
/home/n/kde/src/multimedia/elisa/src/models/trackmetadatamodel.cpp	488	warn	V719 The switch statement does not cover all values of the 'ColumnsRoles' enum: HasChildrenRole.
/home/n/kde/src/multimedia/elisa/src/viewconfigurationdata.cpp	15	err	V730 Not all members of a class are initialized inside the constructor. Consider inspecting: mDisplaySingleAlbum, mShowDiscHeaders, mRadioCase.
/home/n/kde/src/multimedia/elisa/src/viewconfigurationdata.cpp	46	err	V730 Not all members of a class are initialized inside the constructor. Consider inspecting: mViewShowRating, mViewDelegateDisplaySecondaryText.
/home/n/kde/src/multimedia/elisa/src/mediaplaylist.h	104	warn	V1071 Consider inspecting the 'data' function. The return value is not always used. Total calls: 263, discarded results: 1.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.h	61	warn	V1071 Consider inspecting the 'allAlbumsData' function. The return value is not always used. Total calls: 166, discarded results: 1.
/home/n/kde/src/multimedia/elisa/src/databaseinterface.h	71	warn	V1071 Consider inspecting the 'allArtistsData' function. The return value is not always used. Total calls: 122, discarded results: 1.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 22.04
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2022-07-06 16:55:53 UTC
Would you be interested in submitting a merge request to fix these issues? Documenting them is good, but fixing them is better. :)
Comment 2 Marius P 2023-10-07 19:25:53 UTC
Please close this ticket. Thank you.