libtdb-1.4.10-3.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
libtdb-1.4.10-build/tdb-1.4.10/common/check.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def2]
libtdb-1.4.10-build/tdb-1.4.10/common/check.c:217:23: warning[core.NullDereference]: Array access (from variable 'bits') results in a null pointer dereference
# 215| static void bit_flip(unsigned char bits[], unsigned int idx)
# 216| {
# 217|-> bits[idx / CHAR_BIT] ^= (1 << (idx % CHAR_BIT));
# 218| }
# 219|
Error: CPPCHECK_WARNING: [#def3]
libtdb-1.4.10-build/tdb-1.4.10/common/dump.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def4]
libtdb-1.4.10-build/tdb-1.4.10/common/freelist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def5]
libtdb-1.4.10-build/tdb-1.4.10/common/io.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def6]
libtdb-1.4.10-build/tdb-1.4.10/common/lock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def7]
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-775): [#def8]
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
# 843|
# 844| if (initialized) {
# 845|-> return tdb_mutex_locking_cached;
# 846| }
# 847|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def9]
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
# 843|
# 844| if (initialized) {
# 845|-> return tdb_mutex_locking_cached;
# 846| }
# 847|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def10]
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
# 843|
# 844| if (initialized) {
# 845|-> return tdb_mutex_locking_cached;
# 846| }
# 847|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def11]
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
libtdb-1.4.10-build/tdb-1.4.10/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
# 843|
# 844| if (initialized) {
# 845|-> return tdb_mutex_locking_cached;
# 846| }
# 847|
Error: CPPCHECK_WARNING: [#def12]
libtdb-1.4.10-build/tdb-1.4.10/common/open.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def13]
libtdb-1.4.10-build/tdb-1.4.10/common/rescue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def14]
libtdb-1.4.10-build/tdb-1.4.10/common/tdb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def15]
libtdb-1.4.10-build/tdb-1.4.10/common/transaction.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def16]
libtdb-1.4.10-build/tdb-1.4.10/common/traverse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def17]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/getifaddrs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def18]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/os2_delete.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def19]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/os2_delete.c: scope_hint: In function ‘test_readdir_os2_delete’
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/os2_delete.c:11: included_from: Included from here.
/usr/include/dirent.h:164:23: note: argument 1 of ‘readdir’ must be non-null
# 112|
# 113| /* skip past . and .. */
# 114|-> de = readdir(d);
# 115| strcmp(de->d_name, ".") == 0 || FAILED("match .");
# 116| de = readdir(d);
Error: CPPCHECK_WARNING: [#def20]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/strptime.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strdup’
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/replace.h:176: included_from: Included from here.
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c:26: included_from: Included from here.
/usr/include/string.h:156:12: note: argument 2 of ‘strcmp’ must be non-null
# 170| x = strdup("bla");
# 171|
# 172|-> cmp = strcmp("bla", x);
# 173| if (cmp != 0) {
# 174| printf("failure: strdup [\nfailed: expected \"bla\", got \"%s\"\n]\n",
Error: GCC_ANALYZER_WARNING (CWE-476): [#def22]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strndup’
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’
# 269| printf("test: strndup\n");
# 270| x = strndup("bla", 0);
# 271|-> cmp = strcmp(x, "");
# 272| free(x);
# 273| if (cmp != 0) {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def23]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
/usr/include/string.h:156:12: note: argument 1 of ‘strcmp’ must be non-null
# 277|
# 278| x = strndup("bla", 2);
# 279|-> cmp = strcmp(x, "bl");
# 280| free(x);
# 281| if (cmp != 0) {
Error: GCC_ANALYZER_WARNING (CWE-775): [#def24]
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_closefrom’
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/tests/testsuite.c:1114:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
# 1112| if (fd >= 1000) {
# 1113| printf("fd=%d\n", fd);
# 1114|-> closefrom(3);
# 1115| return false;
# 1116| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
libtdb-1.4.10-build/tdb-1.4.10/test/external-agent.c: scope_hint: In function ‘prepare_external_agent’
libtdb-1.4.10-build/tdb-1.4.10/test/external-agent.c:127:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘agent’
# 125| }
# 126|
# 127|-> agent->pid = fork();
# 128| if (agent->pid < 0) {
# 129| fprintf(stderr, "fork failed: %s\n", strerror(errno));
Error: CLANG_WARNING: [#def26]
libtdb-1.4.10-build/tdb-1.4.10/test/external-agent.c:147:10: warning[deadcode.DeadStores]: Although the value stored to 'ret' is used in the enclosing expression, the value is never actually read from 'ret'
# 145| nonblocking_locks = true;
# 146| log_prefix = "external: ";
# 147|-> while ((ret = read(command[0], name, sizeof(name))) > 0) {
# 148| enum agent_return result;
# 149|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def27]
libtdb-1.4.10-build/tdb-1.4.10/test/external-agent.c: scope_hint: In function ‘external_agent_operation’
libtdb-1.4.10-build/tdb-1.4.10/test/external-agent.c:186:19: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘string’
# 184| string = malloc(len);
# 185|
# 186|-> string[0] = op;
# 187| strncpy(string+1, name, len - 1);
# 188| string[len-1] = '\0';
Error: CPPCHECK_WARNING: [#def28]
libtdb-1.4.10-build/tdb-1.4.10/test/lock-tracking.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
libtdb-1.4.10-build/tdb-1.4.10/test/lock-tracking.c: scope_hint: In function ‘fcntl_with_lockcheck’
libtdb-1.4.10-build/tdb-1.4.10/test/lock-tracking.c:134:34: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new’
# 132| if (ret == 0) {
# 133| new = malloc(sizeof *new);
# 134|-> new->off = fl->l_start;
# 135| new->len = fl->l_len;
# 136| new->type = fl->l_type;
Error: CPPCHECK_WARNING: [#def30]
libtdb-1.4.10-build/tdb-1.4.10/test/run-3G-file.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def31]
libtdb-1.4.10-build/tdb-1.4.10/test/run-3G-file.c:113:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 111| data = tdb_fetch(tdb, key);
# 112| ok1(data.dsize == strlen("world"));
# 113|-> ok1(memcmp(data.dptr, "world", strlen("world")) == 0);
# 114| free(data.dptr);
# 115|
Error: CPPCHECK_WARNING: [#def32]
libtdb-1.4.10-build/tdb-1.4.10/test/run-allrecord-traverse-deadlock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def33]
libtdb-1.4.10-build/tdb-1.4.10/test/run-bad-tdb-header.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def34]
libtdb-1.4.10-build/tdb-1.4.10/test/run-check.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def35]
libtdb-1.4.10-build/tdb-1.4.10/test/run-circular-chain.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def36]
libtdb-1.4.10-build/tdb-1.4.10/test/run-circular-freelist.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def37]
libtdb-1.4.10-build/tdb-1.4.10/test/run-corrupt.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def38]
libtdb-1.4.10-build/tdb-1.4.10/test/run-die-during-transaction.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def39]
libtdb-1.4.10-build/tdb-1.4.10/test/run-endian.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def40]
libtdb-1.4.10-build/tdb-1.4.10/test/run-endian.c:42:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 40| data = tdb_fetch(tdb, key);
# 41| ok1(data.dsize == strlen("world"));
# 42|-> ok1(memcmp(data.dptr, "world", strlen("world")) == 0);
# 43| free(data.dptr);
# 44|
Error: CLANG_WARNING: [#def41]
libtdb-1.4.10-build/tdb-1.4.10/test/run-endian.c:59:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 57| data = tdb_fetch(tdb, key);
# 58| ok1(data.dsize == strlen("world"));
# 59|-> ok1(memcmp(data.dptr, "world", strlen("world")) == 0);
# 60| free(data.dptr);
# 61| tdb_close(tdb);
Error: CPPCHECK_WARNING: [#def42]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def43]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c: scope_hint: In function ‘expect_char’
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:100:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 100 | read(pipe_r, buf, 1);
# | ^~~~~~~~~~~~~~~~~~~~
# 98| static void expect_char(char c)
# 99| {
# 100|-> read(pipe_r, buf, 1);
# 101| if (*buf != c) {
# 102| fail("We were expecting %c, but got %c", c, buf[0]);
Error: COMPILER_WARNING (CWE-252): [#def44]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c: scope_hint: In function ‘send_char’
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:108:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 108 | write(pipe_w, &c, 1);
# | ^~~~~~~~~~~~~~~~~~~~
# 106| static void send_char(char c)
# 107| {
# 108|-> write(pipe_w, &c, 1);
# 109| }
# 110|
Error: COMPILER_WARNING (CWE-252): [#def45]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:122:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 122 | pipe(pipes_1_2);
# | ^~~~~~~~~~~~~~~
# 120| int ret;
# 121|
# 122|-> pipe(pipes_1_2);
# 123| pipe(pipes_2_1);
# 124| fd = open(filename, O_RDWR | O_CREAT, 0755);
Error: COMPILER_WARNING (CWE-252): [#def46]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:123:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 123 | pipe(pipes_2_1);
# | ^~~~~~~~~~~~~~~
# 121|
# 122| pipe(pipes_1_2);
# 123|-> pipe(pipes_2_1);
# 124| fd = open(filename, O_RDWR | O_CREAT, 0755);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def47]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:128:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_1_2[0]’
# 126| pid = fork();
# 127| if (pid == 0) {
# 128|-> pipe_r = pipes_1_2[0];
# 129| pipe_w = pipes_2_1[1];
# 130| process = 2;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def48]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:129:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_2_1[1]’
# 127| if (pid == 0) {
# 128| pipe_r = pipes_1_2[0];
# 129|-> pipe_w = pipes_2_1[1];
# 130| process = 2;
# 131| alarm(15);
Error: GCC_ANALYZER_WARNING (CWE-457): [#def49]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:133:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_2_1[0]’
# 131| alarm(15);
# 132| } else {
# 133|-> pipe_r = pipes_2_1[0];
# 134| pipe_w = pipes_1_2[1];
# 135| process = 1;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def50]
libtdb-1.4.10-build/tdb-1.4.10/test/run-fcntl-deadlock.c:134:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_1_2[1]’
# 132| } else {
# 133| pipe_r = pipes_2_1[0];
# 134|-> pipe_w = pipes_1_2[1];
# 135| process = 1;
# 136| alarm(15);
Error: CPPCHECK_WARNING: [#def51]
libtdb-1.4.10-build/tdb-1.4.10/test/run-incompatible.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def52]
libtdb-1.4.10-build/tdb-1.4.10/test/run-marklock-deadlock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def53]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-bench.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def54]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def55]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 45 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 43| ok(ret == 0, "tdb_allrecord_lock should succeed");
# 44|
# 45|-> write(to, &c, sizeof(c));
# 46|
# 47| read(from, &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def56]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 47 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 45| write(to, &c, sizeof(c));
# 46|
# 47|-> read(from, &c, sizeof(c));
# 48|
# 49| ret = tdb_allrecord_unlock(tdb, F_WRLCK, false);
Error: COMPILER_WARNING (CWE-252): [#def57]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:81:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 81 | pipe(fromchild);
# | ^~~~~~~~~~~~~~~
# 79| data.dptr = discard_const_p(uint8_t, "world");
# 80|
# 81|-> pipe(fromchild);
# 82| pipe(tochild);
# 83|
Error: COMPILER_WARNING (CWE-252): [#def58]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:82:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 82 | pipe(tochild);
# | ^~~~~~~~~~~~~
# 80|
# 81| pipe(fromchild);
# 82|-> pipe(tochild);
# 83|
# 84| tdb_flags = TDB_INCOMPATIBLE_HASH|
Error: COMPILER_WARNING (CWE-252): [#def59]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:97:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 97 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 95| close(tochild[0]);
# 96|
# 97|-> read(fromchild[0], &c, sizeof(c));
# 98|
# 99| tdb = tdb_open_ex("mutex-allrecord-block.tdb", 0,
Error: COMPILER_WARNING (CWE-252): [#def60]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-block.c:107:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 107 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 105| ok(ret == -1, "tdb_chainlock_nonblock should not succeed");
# 106|
# 107|-> write(tochild[1], &c, sizeof(c));
# 108|
# 109| ret = tdb_chainlock(tdb, key);
Error: CPPCHECK_WARNING: [#def61]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def62]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 45 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 43| ok(ret == 0, "tdb_chainlock should succeed");
# 44|
# 45|-> write(to, &c, sizeof(c));
# 46|
# 47| read(from, &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def63]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 47 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 45| write(to, &c, sizeof(c));
# 46|
# 47|-> read(from, &c, sizeof(c));
# 48|
# 49| ret = tdb_chainunlock(tdb, key);
Error: COMPILER_WARNING (CWE-252): [#def64]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:81:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 81 | pipe(fromchild);
# | ^~~~~~~~~~~~~~~
# 79| data.dptr = discard_const_p(uint8_t, "world");
# 80|
# 81|-> pipe(fromchild);
# 82| pipe(tochild);
# 83|
Error: COMPILER_WARNING (CWE-252): [#def65]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:82:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 82 | pipe(tochild);
# | ^~~~~~~~~~~~~
# 80|
# 81| pipe(fromchild);
# 82|-> pipe(tochild);
# 83|
# 84| tdb_flags = TDB_INCOMPATIBLE_HASH|
Error: COMPILER_WARNING (CWE-252): [#def66]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:97:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 97 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 95| close(tochild[0]);
# 96|
# 97|-> read(fromchild[0], &c, sizeof(c));
# 98|
# 99| tdb = tdb_open_ex("mutex-allrecord-trylock.tdb", 0, tdb_flags,
Error: COMPILER_WARNING (CWE-252): [#def67]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-allrecord-trylock.c:106:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 106 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 104| ok(ret == -1, "tdb_allrecord_lock (nowait) should not succeed");
# 105|
# 106|-> write(tochild[1], &c, sizeof(c));
# 107|
# 108| wait_ret = wait(&status);
Error: CPPCHECK_WARNING: [#def68]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-die.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def69]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-openflags2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def70]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-openflags2.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-openflags2.c:44:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 44 | read(fd, &c, 1);
# | ^~~~~~~~~~~~~~~
# 42| char c;
# 43|
# 44|-> read(fd, &c, 1);
# 45|
# 46| tdb = tdb_open_ex("mutex-openflags2.tdb", 0,
Error: COMPILER_WARNING (CWE-252): [#def71]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-openflags2.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-openflags2.c:138:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 138 | write(pipefd[1], &c, 1);
# | ^~~~~~~~~~~~~~~~~~~~~~~
# 136| ok((tdb != NULL), "tdb_open_ex with mutexes should succeed");
# 137|
# 138|-> write(pipefd[1], &c, 1);
# 139|
# 140| wait_ret = wait(&status);
Error: CPPCHECK_WARNING: [#def72]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def73]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:48:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 48 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 46| ok(ret == 0, "tdb_store(tdb, key, data, TDB_INSERT) should succeed");
# 47|
# 48|-> write(to, &c, sizeof(c));
# 49| read(from, &c, sizeof(c));
# 50|
Error: COMPILER_WARNING (CWE-252): [#def74]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:49:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 49 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 47|
# 48| write(to, &c, sizeof(c));
# 49|-> read(from, &c, sizeof(c));
# 50|
# 51| ret = tdb_transaction_cancel(tdb);
Error: COMPILER_WARNING (CWE-252): [#def75]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:54:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 54 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 52| ok(ret == 0, "tdb_transaction_cancel should succeed");
# 53|
# 54|-> write(to, &c, sizeof(c));
# 55| read(from, &c, sizeof(c));
# 56|
Error: COMPILER_WARNING (CWE-252): [#def76]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:55:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 55 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 53|
# 54| write(to, &c, sizeof(c));
# 55|-> read(from, &c, sizeof(c));
# 56|
# 57| ret = tdb_transaction_start(tdb);
Error: COMPILER_WARNING (CWE-252): [#def77]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:63:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 63 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 61| ok(ret == 0, "tdb_store(tdb, key, data, TDB_INSERT) should succeed");
# 62|
# 63|-> write(to, &c, sizeof(c));
# 64| read(from, &c, sizeof(c));
# 65|
Error: COMPILER_WARNING (CWE-252): [#def78]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:64:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 64 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 62|
# 63| write(to, &c, sizeof(c));
# 64|-> read(from, &c, sizeof(c));
# 65|
# 66| ret = tdb_transaction_commit(tdb);
Error: COMPILER_WARNING (CWE-252): [#def79]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:69:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 69 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 67| ok(ret == 0, "tdb_transaction_commit should succeed");
# 68|
# 69|-> write(to, &c, sizeof(c));
# 70| read(from, &c, sizeof(c));
# 71|
Error: COMPILER_WARNING (CWE-252): [#def80]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:70:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 70 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 68|
# 69| write(to, &c, sizeof(c));
# 70|-> read(from, &c, sizeof(c));
# 71|
# 72| ret = tdb_transaction_start(tdb);
Error: COMPILER_WARNING (CWE-252): [#def81]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:78:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 78 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 76| ok(ret == 0, "tdb_store(tdb, key, data, TDB_REPLACE) should succeed");
# 77|
# 78|-> write(to, &c, sizeof(c));
# 79| read(from, &c, sizeof(c));
# 80|
Error: COMPILER_WARNING (CWE-252): [#def82]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:79:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 79 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 77|
# 78| write(to, &c, sizeof(c));
# 79|-> read(from, &c, sizeof(c));
# 80|
# 81| ret = tdb_transaction_commit(tdb);
Error: COMPILER_WARNING (CWE-252): [#def83]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:84:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 84 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 82| ok(ret == 0, "tdb_transaction_commit should succeed");
# 83|
# 84|-> write(to, &c, sizeof(c));
# 85| read(from, &c, sizeof(c));
# 86|
Error: COMPILER_WARNING (CWE-252): [#def84]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:85:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 85 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 83|
# 84| write(to, &c, sizeof(c));
# 85|-> read(from, &c, sizeof(c));
# 86|
# 87| return 0;
Error: COMPILER_WARNING (CWE-252): [#def85]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:117:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 117 | pipe(fromchild);
# | ^~~~~~~~~~~~~~~
# 115| data.dptr = discard_const_p(uint8_t, "world");
# 116|
# 117|-> pipe(fromchild);
# 118| pipe(tochild);
# 119|
Error: COMPILER_WARNING (CWE-252): [#def86]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:118:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 118 | pipe(tochild);
# | ^~~~~~~~~~~~~
# 116|
# 117| pipe(fromchild);
# 118|-> pipe(tochild);
# 119|
# 120| tdb_flags = TDB_INCOMPATIBLE_HASH|
Error: COMPILER_WARNING (CWE-252): [#def87]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:133:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 133 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 131| close(tochild[0]);
# 132|
# 133|-> read(fromchild[0], &c, sizeof(c));
# 134|
# 135| tdb = tdb_open_ex("mutex-transaction1.tdb", 0,
Error: COMPILER_WARNING (CWE-252): [#def88]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:158:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 158 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 156| ok(val.dsize == 0, "tdb_fetch(tdb, key) should return an empty value");
# 157|
# 158|-> write(tochild[1], &c, sizeof(c));
# 159|
# 160| /*
Error: COMPILER_WARNING (CWE-252): [#def89]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:166:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 166 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 164| ok(ret == 0, "tdb_transaction_start should succeed");
# 165|
# 166|-> read(fromchild[0], &c, sizeof(c));
# 167| write(tochild[1], &c, sizeof(c));
# 168|
Error: COMPILER_WARNING (CWE-252): [#def90]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:167:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 167 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 165|
# 166| read(fromchild[0], &c, sizeof(c));
# 167|-> write(tochild[1], &c, sizeof(c));
# 168|
# 169| ret = tdb_transaction_cancel(tdb);
Error: COMPILER_WARNING (CWE-252): [#def91]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:175:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 175 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 173| * When we canceled the child can start and store...
# 174| */
# 175|-> read(fromchild[0], &c, sizeof(c));
# 176|
# 177| /*
Error: COMPILER_WARNING (CWE-252): [#def92]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:186:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 186 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 184| ok(val.dsize == 0, "tdb_fetch(tdb, key) should return an empty value");
# 185|
# 186|-> write(tochild[1], &c, sizeof(c));
# 187| read(fromchild[0], &c, sizeof(c));
# 188|
Error: COMPILER_WARNING (CWE-252): [#def93]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:187:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 187 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 185|
# 186| write(tochild[1], &c, sizeof(c));
# 187|-> read(fromchild[0], &c, sizeof(c));
# 188|
# 189| /*
Error: CLANG_WARNING: [#def94]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:198:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 196| ok(val.dsize != 0, "tdb_fetch(tdb, key) should return a value");
# 197| ok(val.dsize == data.dsize, "tdb_fetch(tdb, key) should return a value");
# 198|-> ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 199|
# 200| write(tochild[1], &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def95]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:200:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 200 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 198| ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 199|
# 200|-> write(tochild[1], &c, sizeof(c));
# 201| read(fromchild[0], &c, sizeof(c));
# 202|
Error: COMPILER_WARNING (CWE-252): [#def96]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:201:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 201 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 199|
# 200| write(tochild[1], &c, sizeof(c));
# 201|-> read(fromchild[0], &c, sizeof(c));
# 202|
# 203| /*
Error: CLANG_WARNING: [#def97]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:213:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 211| ok(val.dsize != 0, "tdb_fetch(tdb, key) should return a value");
# 212| ok(val.dsize == data.dsize, "tdb_fetch(tdb, key) should return a value");
# 213|-> ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 214|
# 215| write(tochild[1], &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def98]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:215:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 215 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 213| ok(memcmp(val.dptr, data.dptr, data.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 214|
# 215|-> write(tochild[1], &c, sizeof(c));
# 216| read(fromchild[0], &c, sizeof(c));
# 217|
Error: COMPILER_WARNING (CWE-252): [#def99]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:216:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 216 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 214|
# 215| write(tochild[1], &c, sizeof(c));
# 216|-> read(fromchild[0], &c, sizeof(c));
# 217|
# 218| /*
Error: CLANG_WARNING: [#def100]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:227:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 225| ok(val.dsize != 0, "tdb_fetch(tdb, key) should return a value");
# 226| ok(val.dsize == key.dsize, "tdb_fetch(tdb, key) should return a value");
# 227|-> ok(memcmp(val.dptr, key.dptr, key.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 228|
# 229| write(tochild[1], &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def101]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-transaction1.c:229:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 229 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 227| ok(memcmp(val.dptr, key.dptr, key.dsize) == 0, "tdb_fetch(tdb, key) should return a value");
# 228|
# 229|-> write(tochild[1], &c, sizeof(c));
# 230|
# 231| wait_ret = wait(&status);
Error: CPPCHECK_WARNING: [#def102]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def103]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 45 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 43| ok(ret == 0, "tdb_chainlock should succeed");
# 44|
# 45|-> write(to, &c, sizeof(c));
# 46|
# 47| read(from, &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def104]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:47:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 47 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 45| write(to, &c, sizeof(c));
# 46|
# 47|-> read(from, &c, sizeof(c));
# 48|
# 49| ret = tdb_chainunlock(tdb, key);
Error: COMPILER_WARNING (CWE-252): [#def105]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:52:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 52 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 50| ok(ret == 0, "tdb_chainunlock should succeed");
# 51|
# 52|-> write(to, &c, sizeof(c));
# 53|
# 54| return 0;
Error: COMPILER_WARNING (CWE-252): [#def106]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:83:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 83 | pipe(fromchild);
# | ^~~~~~~~~~~~~~~
# 81| data.dptr = discard_const_p(uint8_t, "world");
# 82|
# 83|-> pipe(fromchild);
# 84| pipe(tochild);
# 85|
Error: COMPILER_WARNING (CWE-252): [#def107]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:84:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 84 | pipe(tochild);
# | ^~~~~~~~~~~~~
# 82|
# 83| pipe(fromchild);
# 84|-> pipe(tochild);
# 85|
# 86| tdb_flags = TDB_INCOMPATIBLE_HASH|
Error: COMPILER_WARNING (CWE-252): [#def108]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:99:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 99 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 97| close(tochild[0]);
# 98|
# 99|-> read(fromchild[0], &c, sizeof(c));
# 100|
# 101| tdb = tdb_open_ex("mutex-trylock.tdb", 0, tdb_flags,
Error: COMPILER_WARNING (CWE-252): [#def109]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:108:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 108 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 106| ok(ret == -1, "tdb_chainlock_nonblock should not succeed");
# 107|
# 108|-> write(tochild[1], &c, sizeof(c));
# 109|
# 110| read(fromchild[0], &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def110]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex-trylock.c:110:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 110 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 108| write(tochild[1], &c, sizeof(c));
# 109|
# 110|-> read(fromchild[0], &c, sizeof(c));
# 111|
# 112| ret = tdb_chainlock_nonblock(tdb, key);
Error: CPPCHECK_WARNING: [#def111]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-252): [#def112]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c: scope_hint: In function ‘do_child’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:45:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 45 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 43| ok(ret == 0, "tdb_chainlock should succeed");
# 44|
# 45|-> write(to, &c, sizeof(c));
# 46| read(from, &c, sizeof(c));
# 47|
Error: COMPILER_WARNING (CWE-252): [#def113]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:46:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 46 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 44|
# 45| write(to, &c, sizeof(c));
# 46|-> read(from, &c, sizeof(c));
# 47|
# 48| ret = tdb_chainunlock(tdb, key);
Error: COMPILER_WARNING (CWE-252): [#def114]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:51:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 51 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 49| ok(ret == 0, "tdb_chainunlock should succeed");
# 50|
# 51|-> write(to, &c, sizeof(c));
# 52| read(from, &c, sizeof(c));
# 53|
Error: COMPILER_WARNING (CWE-252): [#def115]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:52:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 52 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 50|
# 51| write(to, &c, sizeof(c));
# 52|-> read(from, &c, sizeof(c));
# 53|
# 54| ret = tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false);
Error: COMPILER_WARNING (CWE-252): [#def116]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:57:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 57 | write(to, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~
# 55| ok(ret == 0, "tdb_allrecord_lock should succeed");
# 56|
# 57|-> write(to, &c, sizeof(c));
# 58| read(from, &c, sizeof(c));
# 59|
Error: COMPILER_WARNING (CWE-252): [#def117]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:58:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 58 | read(from, &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~
# 56|
# 57| write(to, &c, sizeof(c));
# 58|-> read(from, &c, sizeof(c));
# 59|
# 60| ret = tdb_allrecord_unlock(tdb, F_WRLCK, false);
Error: COMPILER_WARNING (CWE-252): [#def118]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:92:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 92 | pipe(fromchild);
# | ^~~~~~~~~~~~~~~
# 90| data.dptr = discard_const_p(uint8_t, "world");
# 91|
# 92|-> pipe(fromchild);
# 93| pipe(tochild);
# 94|
Error: COMPILER_WARNING (CWE-252): [#def119]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:93:9: warning[-Wunused-result]: ignoring return value of ‘pipe’ declared with attribute ‘warn_unused_result’
# 93 | pipe(tochild);
# | ^~~~~~~~~~~~~
# 91|
# 92| pipe(fromchild);
# 93|-> pipe(tochild);
# 94|
# 95| tdb_flags = TDB_INCOMPATIBLE_HASH|
Error: COMPILER_WARNING (CWE-252): [#def120]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:108:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 108 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 106| close(tochild[0]);
# 107|
# 108|-> read(fromchild[0], &c, sizeof(c));
# 109|
# 110| tdb = tdb_open_ex("mutex1.tdb", 0, tdb_flags,
Error: COMPILER_WARNING (CWE-252): [#def121]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:114:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 114 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 112| ok(tdb, "tdb_open_ex should succeed");
# 113|
# 114|-> write(tochild[1], &c, sizeof(c));
# 115| read(fromchild[0], &c, sizeof(c));
# 116|
Error: COMPILER_WARNING (CWE-252): [#def122]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:115:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 115 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 113|
# 114| write(tochild[1], &c, sizeof(c));
# 115|-> read(fromchild[0], &c, sizeof(c));
# 116|
# 117| ret = tdb_allrecord_lock(tdb, F_WRLCK, TDB_LOCK_WAIT, false);
Error: COMPILER_WARNING (CWE-252): [#def123]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:126:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 126 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 124| ok(ret == 0, "tdb_allrecord_unlock should succeed");
# 125|
# 126|-> write(tochild[1], &c, sizeof(c));
# 127| read(fromchild[0], &c, sizeof(c));
# 128| write(tochild[1], &c, sizeof(c));
Error: COMPILER_WARNING (CWE-252): [#def124]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:127:9: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
# 127 | read(fromchild[0], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 125|
# 126| write(tochild[1], &c, sizeof(c));
# 127|-> read(fromchild[0], &c, sizeof(c));
# 128| write(tochild[1], &c, sizeof(c));
# 129|
Error: COMPILER_WARNING (CWE-252): [#def125]
libtdb-1.4.10-build/tdb-1.4.10/test/run-mutex1.c:128:9: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
# 128 | write(tochild[1], &c, sizeof(c));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 126| write(tochild[1], &c, sizeof(c));
# 127| read(fromchild[0], &c, sizeof(c));
# 128|-> write(tochild[1], &c, sizeof(c));
# 129|
# 130| ret = tdb_delete(tdb, key);
Error: CPPCHECK_WARNING: [#def126]
libtdb-1.4.10-build/tdb-1.4.10/test/run-nested-transactions.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def127]
libtdb-1.4.10-build/tdb-1.4.10/test/run-nested-traverse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def128]
libtdb-1.4.10-build/tdb-1.4.10/test/run-no-lock-during-traverse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def129]
libtdb-1.4.10-build/tdb-1.4.10/test/run-oldhash.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def130]
libtdb-1.4.10-build/tdb-1.4.10/test/run-open-during-transaction.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def131]
libtdb-1.4.10-build/tdb-1.4.10/test/run-rdlock-upgrade.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def132]
libtdb-1.4.10-build/tdb-1.4.10/test/run-readonly-check.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def133]
libtdb-1.4.10-build/tdb-1.4.10/test/run-rescue-find_entry.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def134]
libtdb-1.4.10-build/tdb-1.4.10/test/run-rescue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def135]
libtdb-1.4.10-build/tdb-1.4.10/test/run-rwlock-check.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def136]
libtdb-1.4.10-build/tdb-1.4.10/test/run-summary.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def137]
libtdb-1.4.10-build/tdb-1.4.10/test/run-transaction-expand.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def138]
libtdb-1.4.10-build/tdb-1.4.10/test/run-traverse-chain.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def139]
libtdb-1.4.10-build/tdb-1.4.10/test/run-traverse-in-transaction.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def140]
libtdb-1.4.10-build/tdb-1.4.10/test/run-wronghash-fail.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def141]
libtdb-1.4.10-build/tdb-1.4.10/test/run-zero-append.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def142]
libtdb-1.4.10-build/tdb-1.4.10/test/run.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def143]
libtdb-1.4.10-build/tdb-1.4.10/test/run.c:41:6: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 39| data = tdb_fetch(tdb, key);
# 40| ok1(data.dsize == strlen("world"));
# 41|-> ok1(memcmp(data.dptr, "world", strlen("world")) == 0);
# 42| free(data.dptr);
# 43|
Error: CPPCHECK_WARNING: [#def144]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbbackup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CLANG_WARNING: [#def145]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbdump.c:62:14: warning[deadcode.DeadStores]: Value stored to 'prefix' during its initialization is never read
# 60| va_list ap;
# 61| const char *name = tdb_name(tdb);
# 62|-> const char *prefix = "";
# 63|
# 64| if (!name)
Error: CPPCHECK_WARNING: [#def146]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbrestore.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def147]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def148]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtortseq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def149]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def150]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c: scope_hint: In function ‘randbuf’
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:79:24: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
# 77|
# 78| for (i=0;i<len;i++) {
# 79|-> buf[i] = 'a' + (rand() % 26);
# 80| }
# 81| buf[i] = 0;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def151]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:81:16: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’
# 79| buf[i] = 'a' + (rand() % 26);
# 80| }
# 81|-> buf[i] = 0;
# 82| return buf;
# 83| }
Error: GCC_ANALYZER_WARNING (CWE-688): [#def152]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:361:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
/usr/include/unistd.h:858:12: note: argument 1 of ‘unlink’ must be non-null
# 359| test_tdb = test_path("torture.tdb");
# 360|
# 361|-> unlink(test_tdb);
# 362|
# 363| if (seed == -1) {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def153]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c: scope_hint: In function ‘main’
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:361:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘test_path("torture.tdb")’ where non-null expected
libtdb-1.4.10-build/tdb-1.4.10/lib/replace/replace.h:172: included_from: Included from here.
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:5: included_from: Included from here.
/usr/include/unistd.h:858:12: note: argument 1 of ‘unlink’ must be non-null
# 359| test_tdb = test_path("torture.tdb");
# 360|
# 361|-> unlink(test_tdb);
# 362|
# 363| if (seed == -1) {
Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
libtdb-1.4.10-build/tdb-1.4.10/tools/tdbtorture.c:369:36: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’
# 367| printf("Testing with %d processes, %d loops, %d hash_size, seed=%d%s\n",
# 368| num_procs, num_loops, hash_size, seed,
# 369|-> (always_transaction ? " (all within transactions)" : ""));
# 370|
# 371| if (num_procs == 1 && !kill_random) {
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-197.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | libtdb-1.4.10-3.fc41 |
store-results-to | /tmp/tmphhaq70os/libtdb-1.4.10-3.fc41.tar.xz |
time-created | 2024-07-03 16:03:39 |
time-finished | 2024-07-03 16:07:41 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmphhaq70os/libtdb-1.4.10-3.fc41.tar.xz' '--gcc-analyze' '/tmp/tmphhaq70os/libtdb-1.4.10-3.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |