kf5-kinit-5.116.0-1.fc41

List of Defects

Error: COMPILER_WARNING (CWE-252): [#def1]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘void child_died(pid_t, int)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:244:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  244 |             write(child->sock, &request_header, sizeof(request_header));
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  242|               request_data[0] = exit_pid;
#  243|               request_data[1] = exit_status;
#  244|->             write(child->sock, &request_header, sizeof(request_header));
#  245|               write(child->sock, request_data, request_header.arg_length);
#  246|               close(child->sock);

Error: COMPILER_WARNING (CWE-252): [#def2]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:245:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  245 |             write(child->sock, request_data, request_header.arg_length);
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  243|               request_data[1] = exit_status;
#  244|               write(child->sock, &request_header, sizeof(request_header));
#  245|->             write(child->sock, request_data, request_header.arg_length);
#  246|               close(child->sock);
#  247|   

Error: COMPILER_WARNING (CWE-252): [#def3]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘pid_t launch(int, const char*, const char*, const char*, int, const char*, bool, const char*, bool, const char*)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:493:24: warning[-Wunused-result]: ignoring return value of ‘int chdir(const char*)’ declared with attribute ‘warn_unused_result’
#  493 |             (void)chdir(cwd);
#      |                   ~~~~~^~~~~
#  491|           // we still want to execute `foo` even if the chdir() failed.
#  492|           if (cwd && *cwd) {
#  493|->             (void)chdir(cwd);
#  494|           }
#  495|   

Error: COMPILER_WARNING (CWE-252): [#def4]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:560:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  560 |         write(d.fd[1], &d.result, 1);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  558|   
#  559|           d.result = 2; // Try execing
#  560|->         write(d.fd[1], &d.result, 1);
#  561|   
#  562|           // We set the close on exec flag.

Error: COMPILER_WARNING (CWE-252): [#def5]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:574:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  574 |         write(d.fd[1], &d.result, 1);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#  572|   
#  573|           d.result = 1; // Error
#  574|->         write(d.fd[1], &d.result, 1);
#  575|           close(d.fd[1]);
#  576|           exit(255);

Error: COMPILER_WARNING (CWE-252): [#def6]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘void sig_child_handler(int)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:659:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  659 |         write(d.deadpipe[1], &c, 1);
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
#  657|            */
#  658|           char c = 0;
#  659|->         write(d.deadpipe[1], &c, 1);
#  660|       }
#  661|   

Error: COMPILER_WARNING (CWE-252): [#def7]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘void init_kdeinit_socket()’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:766:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#  766 |             write(s, &request_header, sizeof(request_header));
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  764|               request_header.cmd = LAUNCHER_TERMINATE_KDEINIT;
#  765|               request_header.arg_length = 0;
#  766|->             write(s, &request_header, sizeof(request_header));
#  767|               sleep(1); // Give it some time
#  768|           }

Error: COMPILER_WARNING (CWE-252): [#def8]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘bool handle_launcher_request(int, const char*)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1028:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1028 |             write(sock, &response_header, sizeof(response_header));
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1026|               response_header.arg_length = sizeof(response_data);
# 1027|               response_data = pid;
# 1028|->             write(sock, &response_header, sizeof(response_header));
# 1029|               write(sock, &response_data, response_header.arg_length);
# 1030|   

Error: COMPILER_WARNING (CWE-252): [#def9]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1029:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1029 |             write(sock, &response_data, response_header.arg_length);
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1027|               response_data = pid;
# 1028|               write(sock, &response_header, sizeof(response_header));
# 1029|->             write(sock, &response_data, response_header.arg_length);
# 1030|   
# 1031|               // add new child to list

Error: COMPILER_WARNING (CWE-252): [#def10]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1044:18: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1044 |             write(sock, &response_header, sizeof(response_header));
#      |             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1042|               response_header.cmd = LAUNCHER_ERROR;
# 1043|               response_header.arg_length = l;
# 1044|->             write(sock, &response_header, sizeof(response_header));
# 1045|               if (l) {
# 1046|                   write(sock, d.errorMsg.data(), l);

Error: COMPILER_WARNING (CWE-252): [#def11]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1046:22: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1046 |                 write(sock, d.errorMsg.data(), l);
#      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 1044|               write(sock, &response_header, sizeof(response_header));
# 1045|               if (l) {
# 1046|->                 write(sock, d.errorMsg.data(), l);
# 1047|               }
# 1048|           }

Error: CLANG_WARNING: [#def12]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1496:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'safe_argv'
# 1494|   #else
# 1495|           if (pipe(d.initpipe) != 0) {
# 1496|->             perror("kdeinit5: pipe failed");
# 1497|               return 1;
# 1498|           }

Error: CLANG_WARNING: [#def13]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1616:13: warning[deadcode.DeadStores]: Value stored to 'pid' is never read
# 1614|               // Ignore
# 1615|           } else {
# 1616|->             pid = launch(1, safe_argv[i], nullptr);
# 1617|   #ifndef NDEBUG
# 1618|               fprintf(stderr, "kdeinit5: Launched '%s', pid = %ld result = %d\n", safe_argv[i], (long) pid, d.result);

Error: COMPILER_WARNING (CWE-252): [#def14]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp: scope_hint: In function ‘int main(int, char**)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/kinit.cpp:1639:14: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
# 1639 |         write(d.initpipe[1], &c, 1); // Kdeinit is started.
#      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
# 1637|       if (d.initpipe[1] != -1) {
# 1638|           char c = 0;
# 1639|->         write(d.initpipe[1], &c, 1); // Kdeinit is started.
# 1640|           close(d.initpipe[1]);
# 1641|           d.initpipe[1] = -1;

Error: CPPCHECK_WARNING: [#def15]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/kdeinit/proctitle.cpp: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-477): [#def16]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp: scope_hint: In member function ‘bool KLauncher::start_service(KService::Ptr, const QStringList&, const QStringList&, const QByteArray&, bool, const QDBusMessage&)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp:705:62: warning[-Wdeprecated-declarations]: ‘KService::DBusStartupType KService::dbusStartupType() const’ is deprecated: Since 5.102. No known users
#  705 |         request->dbus_startup_type = service->dbusStartupType();
#      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~^~
/usr/include/KF5/KService/KService:1: included_from: Included from here.
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.h:34: included_from: Included from here.
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp:12: included_from: Included from here.
/usr/include/KF5/KService/kservice.h:203:21: note: declared here
#  203 |     DBusStartupType dbusStartupType() const;
#      |                     ^~~~~~~~~~~~~~~
#  703|           request->dbus_name = QStringLiteral("org.kde.kioexec");
#  704|       } else {
#  705|->         request->dbus_startup_type = service->dbusStartupType();
#  706|   
#  707|           if ((request->dbus_startup_type == KService::DBusUnique) ||

Error: COMPILER_WARNING (CWE-477): [#def17]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp: scope_hint: In member function ‘pid_t KLauncher::requestSlave(const QString&, const QString&, const QString&, QString&)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp:969:46: warning[-Wdeprecated-declarations]: ‘QString KPluginLoader::fileName() const’ is deprecated: Since 5.86. Use QPluginLoader::fileName() instead, in case of complex query logic consider using KPluginLoader::findPlugins
#  969 |     QString slaveModulePath = loader.fileName();
#      |                               ~~~~~~~~~~~~~~~^~
/usr/include/KF5/KCoreAddons/KPluginLoader:1: included_from: Included from here.
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher.cpp:42: included_from: Included from here.
/usr/include/KF5/KCoreAddons/kpluginloader.h:206:13: note: declared here
#  206 |     QString fileName() const;
#      |             ^~~~~~~~
#  967|       }
#  968|       KPluginLoader loader(slaveModule);
#  969|->     QString slaveModulePath = loader.fileName();
#  970|       if (slaveModulePath.isEmpty()) {
#  971|           error = i18n("Could not find the '%1' plugin.\n", slaveModule);

Error: COMPILER_WARNING (CWE-252): [#def18]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher_main.cpp: scope_hint: In function ‘void sig_handler(int)’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher_main.cpp:41:10: warning[-Wunused-result]: ignoring return value of ‘ssize_t write(int, const void*, size_t)’ declared with attribute ‘warn_unused_result’
#   41 |     write(sigpipe[ 1 ], &tmp, 1);
#      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~
#   39|       fprintf(stderr, "klauncher: Exiting on signal %d\n", sig_num);
#   40|       char tmp = 'x';
#   41|->     write(sigpipe[ 1 ], &tmp, 1);
#   42|   }
#   43|   #endif

Error: CLANG_WARNING: [#def19]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/klauncher/klauncher_main.cpp:219:5: warning[cplusplus.NewDeleteLeaks]: Potential leak of memory pointed to by 'signotif'
#  217|       QSocketNotifier *signotif = new QSocketNotifier(sigpipe[ 0 ], QSocketNotifier::Read, launcher);
#  218|       QObject::connect(signotif, SIGNAL(activated(int)), launcher, SLOT(destruct()));
#  219|->     KCrash::setEmergencySaveFunction(sig_handler);
#  220|       signal(SIGHUP, sig_handler);
#  221|       signal(SIGPIPE, SIG_IGN);

Error: CPPCHECK_WARNING: [#def20]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING: [#def21]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c: scope_hint: In function ‘set_protection’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:56:13: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘open(&buf, 1)’
#   54|           procfile = open(buf, O_WRONLY);
#   55|           if (enable) {
#   56|->             write(procfile, "-300", sizeof("-300"));
#   57|           } else {
#   58|               write(procfile, "0", sizeof("0"));

Error: COMPILER_WARNING (CWE-252): [#def22]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c: scope_hint: In function ‘set_protection’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:56:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   56 |             write(procfile, "-300", sizeof("-300"));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   54|           procfile = open(buf, O_WRONLY);
#   55|           if (enable) {
#   56|->             write(procfile, "-300", sizeof("-300"));
#   57|           } else {
#   58|               write(procfile, "0", sizeof("0"));

Error: GCC_ANALYZER_WARNING: [#def23]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:58:13: warning[-Wanalyzer-fd-use-without-check]: ‘write’ on possibly invalid file descriptor ‘open(&buf, 1)’
#   56|               write(procfile, "-300", sizeof("-300"));
#   57|           } else {
#   58|->             write(procfile, "0", sizeof("0"));
#   59|           }
#   60|           close(procfile);

Error: COMPILER_WARNING (CWE-252): [#def24]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:58:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   58 |             write(procfile, "0", sizeof("0"));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   56|               write(procfile, "-300", sizeof("-300"));
#   57|           } else {
#   58|->             write(procfile, "0", sizeof("0"));
#   59|           }
#   60|           close(procfile);

Error: COMPILER_WARNING (CWE-252): [#def25]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:76:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   76 |             write(procfile, "-5", sizeof("-5"));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   74|       if (procfile >= 0) {
#   75|           if (enable) {
#   76|->             write(procfile, "-5", sizeof("-5"));
#   77|           } else {
#   78|               write(procfile, "0", sizeof("0"));

Error: COMPILER_WARNING (CWE-252): [#def26]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:78:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   78 |             write(procfile, "0", sizeof("0"));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   76|               write(procfile, "-5", sizeof("-5"));
#   77|           } else {
#   78|->             write(procfile, "0", sizeof("0"));
#   79|           }
#   80|           close(procfile);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c: scope_hint: In function ‘main’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:140:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘env’
#  138|                       if (read(0, &len, sizeof(unsigned)) == sizeof(unsigned)
#  139|                               && len && len < (1 << 12)) {
#  140|->                         env[ i ] = malloc(len + 1);
#  141|                           if ((unsigned) read(0, env[ i ], len) == len) {
#  142|                               env[ i ][ len ] = '\0';

Error: CLANG_WARNING: [#def28]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:154:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'env'
#  152|               }
#  153|           }
#  154|->         if (argc == 0) {
#  155|               return 1;
#  156|           }

Error: CLANG_WARNING: [#def29]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:160:20: warning[unix.Malloc]: Potential leak of memory pointed to by 'orig_environ'
#  158|           new_argv = malloc(sizeof(char *) * (new_argc + 1));
#  159|           if (new_argv == NULL) {
#  160|->             return 1;
#  161|           }
#  162|           new_argv[ 0 ] = EXECUTE;

Error: CLANG_WARNING: [#def30]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit.c:176:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'new_argv'
#  174|               execv(EXECUTE, (char **)new_argv);
#  175|           }
#  176|->         perror(EXECUTE);
#  177|           return 1;
#  178|       case 0: /* child, keep privileges and do the privileged work */

Error: GCC_ANALYZER_WARNING: [#def31]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c: scope_hint: In function ‘main’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c:42:9: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘0’
#   40|           close(pipes[ 1 ]);
#   41|           close(0);   /* stdin */
#   42|->         dup2(pipes[ 0 ], 0);
#   43|           close(pipes[ 0 ]);
#   44|           argv[ 0 ] = (char *)EXECUTE;

Error: COMPILER_WARNING (CWE-252): [#def32]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c: scope_hint: In function ‘main’
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c:52:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   52 |         write(pipes[ 1 ], "environ", 7);   /* header, just in case */
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   50|           int i;
#   51|           close(pipes[ 0 ]);
#   52|->         write(pipes[ 1 ], "environ", 7);   /* header, just in case */
#   53|           for (i = 0;
#   54|                   environ[ i ] != NULL;

Error: COMPILER_WARNING (CWE-252): [#def33]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c:57:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   57 |         write(pipes[ 1 ], &i, sizeof(int));    /* write count */
#      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   55|                   ++i) {
#   56|           }
#   57|->         write(pipes[ 1 ], &i, sizeof(int));    /* write count */
#   58|           for (i = 0;
#   59|                   environ[ i ] != NULL;

Error: COMPILER_WARNING (CWE-252): [#def34]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c:62:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   62 |             write(pipes[ 1 ], &len, sizeof(int));    /* write length */
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   60|                   ++i) {
#   61|               int len = strlen(environ[ i ]);
#   62|->             write(pipes[ 1 ], &len, sizeof(int));    /* write length */
#   63|               write(pipes[ 1 ], environ[ i ], strlen(environ[ i ]));
#   64|           }

Error: COMPILER_WARNING (CWE-252): [#def35]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/start_kdeinit/start_kdeinit_wrapper.c:63:13: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#   63 |             write(pipes[ 1 ], environ[ i ], strlen(environ[ i ]));
#      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   61|               int len = strlen(environ[ i ]);
#   62|               write(pipes[ 1 ], &len, sizeof(int));    /* write length */
#   63|->             write(pipes[ 1 ], environ[ i ], strlen(environ[ i ]));
#   64|           }
#   65|           close(pipes[ 1 ]);

Error: CLANG_WARNING: [#def36]
kf5-kinit-5.116.0-build/kinit-5.116.0/src/wrapper.cpp:474:13: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  472|           }
#  473|           read_socket(sock, buffer, header.arg_length);
#  474|->         pid = *((long *) buffer);
#  475|           if (!kwrapper) { /* kwrapper shouldn't print any output */
#  476|               printf("Launched ok, pid = %ld\n", pid);

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-181.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namekf5-kinit-5.116.0-1.fc41
store-results-to/tmp/tmptzofu82g/kf5-kinit-5.116.0-1.fc41.tar.xz
time-created2024-07-03 13:46:56
time-finished2024-07-03 13:48:14
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmptzofu82g/kf5-kinit-5.116.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmptzofu82g/kf5-kinit-5.116.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9