Task #1494 - kf6-kservice-6.0.0-1.fc40/scan-results.err

back to task #1494
download
Error: COMPILER_WARNING (CWE-252):
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/kbuildsycoca.cpp: scope_hint: In member function ‘bool KBuildSycoca::recreate(bool)’
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/kbuildsycoca.cpp:423:23: warning[-Wunused-result]: ignoring return value of ‘int fchown(int, __uid_t, __gid_t)’ declared with attribute ‘warn_unused_result’
#  423 |                 fchown(database.handle(), uid, gid);
#      |                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  421|               const int gid = qEnvironmentVariableIntValue("SUDO_GID");
#  422|               if (uid && gid) {
#  423|->                 fchown(database.handle(), uid, gid);
#  424|               }
#  425|           }

Error: COMPILER_WARNING (CWE-843):
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/kmemfile.cpp: scope_hint: In member function ‘virtual bool KMemFile::open(QIODeviceBase::OpenMode)’
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/kmemfile.cpp:168:15: warning[-Wclass-memaccess]: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘struct KMemFile::Private::sharedInfoData’; use assignment or value-initialization instead
#  168 |         memset(infoPtr, 0, sizeof(Private::sharedInfoData));
#      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/kmemfile.cpp:21:12: note: ‘struct KMemFile::Private::sharedInfoData’ declared here
#   21 |     struct sharedInfoData {
#      |            ^~~~~~~~~~~~~~
#  166|           // no -> create it
#  167|           infoPtr = static_cast<Private::sharedInfoData *>(d->shmInfo.data());
#  168|->         memset(infoPtr, 0, sizeof(Private::sharedInfoData));
#  169|           infoPtr->shmCounter = 1;
#  170|           if (!d->loadContentsFromFile()) {

Error: CLANG_WARNING:
kf6-kservice-6.0.0-build/kservice-6.0.0/src/sycoca/ksycocafactory.cpp:57:9: warning[deadcode.DeadStores]: Value stored to 'saveOffset' is never read
#   55|           // Init index tables
#   56|           d->m_sycocaDict = new KSycocaDict(str, d->m_sycocaDictOffset);
#   57|->         saveOffset = str->device()->seek(saveOffset);
#   58|       } else {
#   59|           // We are in kbuildsycoca -- build new database!