dtkgui-5.6.34-2.fc42

List of Findings

Error: COMPILER_WARNING (CWE-477): [#def1]
dtkgui-5.6.34-build/dtkgui-5.6.34/src/kernel/dguiapplicationhelper.cpp: scope_hint: In member function ‘Dtk::Gui::DPalette Dtk::Gui::DGuiApplicationHelper::windowPalette(QWindow*) const’
dtkgui-5.6.34-build/dtkgui-5.6.34/src/kernel/dguiapplicationhelper.cpp:1318:40: warning[-Wdeprecated-declarations]: ‘Dtk::Gui::DPlatformTheme* Dtk::Gui::DGuiApplicationHelper::windowTheme(QWindow*) const’ is deprecated
# 1318 |     DPlatformTheme *theme = windowTheme(window);
#      |                             ~~~~~~~~~~~^~~~~~~~
dtkgui-5.6.34-build/dtkgui-5.6.34/src/kernel/dguiapplicationhelper.cpp:1168:17: note: declared here
# 1168 | DPlatformTheme *DGuiApplicationHelper::windowTheme(QWindow *window) const
#      |                 ^~~~~~~~~~~~~~~~~~~~~
# 1316|       }
# 1317|   
# 1318|->     DPlatformTheme *theme = windowTheme(window);
# 1319|   
# 1320|       if (Q_UNLIKELY(!theme)) {

Error: COMPILER_WARNING: [#def2]
dtkgui-5.6.34-build/dtkgui-5.6.34/src/private/dfiledragserver_p.h:20:7: warning[-Wodr]: type ‘struct DFileDragServerPrivate’ violates the C++ One Definition Rule
#   20 | class DFileDragServerPrivate : public DCORE_NAMESPACE::DObjectPrivate
#      |       ^
dtkgui-5.6.34-build/dtkgui-5.6.34/src/filedrag/dfiledragserver.cpp:27:7: note: a different type is defined in another translation unit
#   27 | class DFileDragServerPrivate : public DCORE_NAMESPACE::DObjectPrivate
#      |       ^
dtkgui-5.6.34-build/dtkgui-5.6.34/src/filedrag/dfiledragserver.cpp:37:41: note: the first difference of corresponding definitions is field ‘dbusif’
#   37 |     QSharedPointer<DDndSourceInterface> dbusif;
#      |                                         ^
dtkgui-5.6.34-build/dtkgui-5.6.34/src/filedrag/dfiledragserver.cpp:27:7: note: a type with different number of fields is defined in another translation unit
#   27 | class DFileDragServerPrivate : public DCORE_NAMESPACE::DObjectPrivate
#      |       ^
#   18|   class DFileDragServer;
#   19|   
#   20|-> class DFileDragServerPrivate : public DCORE_NAMESPACE::DObjectPrivate
#   21|   {
#   22|       QMap<QString, QVariant> data;

Error: COMPILER_WARNING (CWE-704): [#def3]
dtkgui-5.6.34-build/dtkgui-5.6.34/src/private/dfiledragserver_p.h:28:10: warning[-Wlto-type-mismatch]: type of ‘writeMimeData’ does not match original declaration
#   28 |     void writeMimeData(QMimeData *dest);
#      |          ^
dtkgui-5.6.34-build/dtkgui-5.6.34/src/filedrag/dfiledragserver.cpp:171:6: note: ‘writeMimeData’ was previously declared here
#  171 | void DFileDragServerPrivate::writeMimeData(QMimeData *dest)
#      |      ^
#   26|       ~DFileDragServerPrivate();
#   27|   
#   28|->     void writeMimeData(QMimeData *dest);
#   29|   
#   30|       static DDndSourceInterface *dbusif;

Error: COMPILER_WARNING (CWE-563): [#def4]
dtkgui-5.6.34-build/dtkgui-5.6.34/src/util/dicontheme.cpp: scope_hint: In function ‘bool Dtk::Gui::DIconTheme::isXdgIcon(const QIcon&)’
dtkgui-5.6.34-build/dtkgui-5.6.34/src/util/dicontheme.cpp:126:41: warning[-Wunused-parameter]: unused parameter ‘icon’
#  126 | bool DIconTheme::isXdgIcon(const QIcon &icon)
#      |                            ~~~~~~~~~~~~~^~~~
#  124|   }
#  125|   
#  126|-> bool DIconTheme::isXdgIcon(const QIcon &icon)
#  127|   {
#  128|   #ifdef DTK_DISABLE_LIBXDG

Error: COMPILER_WARNING (CWE-252): [#def5]
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp: scope_hint: In function ‘int exec(const char*)’
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp:95:13: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#   95 |       system(clearCache.c_str());
#      |       ~~~~~~^~~~~~~~~~~~~~~~~~~~
#   93|       if (noCache) {
#   94|         std::string clearCache = "sync && sudo bash -c \"echo 3 > /proc/sys/vm/drop_caches\"";
#   95|->       system(clearCache.c_str());
#   96|       }
#   97|   

Error: COMPILER_WARNING (CWE-252): [#def6]
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp: scope_hint: In function ‘bool checkPid(__pid_t)’
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp:119:17: warning[-Wunused-result]: ignoring return value of ‘ssize_t readlink(const char*, char*, size_t)’ declared with attribute ‘warn_unused_result’
#  119 |         readlink(status, exe_path, 100);
#      |         ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  117|           // 检测是不是deepin-turbo-booster进程
#  118|           char exe_path[100];
#  119|->         readlink(status, exe_path, 100);
#  120|           // 对于deepin-turbo的进程无法检测是否为子进程,因此默认认为是被dde-kwin-debug启动的
#  121|           if (strstr(exe_path, "/usr/lib/deepin-turbo") == exe_path)

Error: COMPILER_WARNING (CWE-252): [#def7]
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp:132:14: warning[-Wunused-result]: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’
#  132 |         fread(data, sizeof(char), 1024, file);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  130|   
#  131|           char data[1024] = {};
#  132|->         fread(data, sizeof(char), 1024, file);
#  133|   
#  134|           // 查找父进程id

Error: COMPILER_WARNING (CWE-252): [#def8]
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp: scope_hint: In function ‘void processXEvent()’
dtkgui-5.6.34-build/dtkgui-5.6.34/tools/dde-kwin-debug/main.cpp:287:31: warning[-Wunused-result]: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’
#  287 |                         system(command);
#      |                         ~~~~~~^~~~~~~~~
#  285|                           char command[100];
#  286|                           sprintf(command, "xkill -id %lu > /dev/null", pe->window);
#  287|->                         system(command);
#  288|                       }
#  289|                   }

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-222.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namedtkgui-5.6.34-2.fc42
store-results-to/tmp/tmpqkm5z7ph/dtkgui-5.6.34-2.fc42.tar.xz
time-created2024-11-12 23:40:54
time-finished2024-11-12 23:42:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpqkm5z7ph/dtkgui-5.6.34-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpqkm5z7ph/dtkgui-5.6.34-2.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9