kf5-kcrash-5.116.0-1.fc41

List of Defects

Error: COMPILER_WARNING (CWE-252): [#def1]
kf5-kcrash-5.116.0-build/kcrash-5.116.0/src/metadata.cpp: scope_hint: In constructor ‘KCrash::MetadataINIWriter::MetadataINIWriter(const QByteArray&)’
kf5-kcrash-5.116.0-build/kcrash-5.116.0/src/metadata.cpp:35:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   35 |         write(fd, header, strlen(header));
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   33|           writable = true;
#   34|           const char *header = "[KCrash]\n";
#   35|->         write(fd, header, strlen(header));
#   36|       } else {
#   37|           fprintf(stderr, "MetadataINIWriter: Unexpected fd %d\n", fd);

Error: COMPILER_WARNING (CWE-252): [#def2]
kf5-kcrash-5.116.0-build/kcrash-5.116.0/src/metadata.cpp: scope_hint: In member function ‘virtual void KCrash::MetadataINIWriter::add(const char*, const char*, KCrash::MetadataWriter::BoolValue)’
kf5-kcrash-5.116.0-build/kcrash-5.116.0/src/metadata.cpp:69:10: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   69 |     write(fd, iniLine.data(), lineLength);
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   67|       fprintf(stderr, "%d -- %s", lineLength, iniLine.data());
#   68|       Q_ASSERT(lineLength <= iniLine.max_size()); // is not truncated41
#   69|->     write(fd, iniLine.data(), lineLength);
#   70|   }
#   71|   

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
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-59.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namekf5-kcrash-5.116.0-1.fc41
store-results-to/tmp/tmpe1g9k019/kf5-kcrash-5.116.0-1.fc41.tar.xz
time-created2024-07-03 13:42:28
time-finished2024-07-03 13:43:26
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpe1g9k019/kf5-kcrash-5.116.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpe1g9k019/kf5-kcrash-5.116.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9