Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] tdb-1.4.13/bin/default/../../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’ tdb-1.4.13/bin/default/../../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:868:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:869:17: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)... tdb-1.4.13/bin/default/../../common/mutex.c:1001:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1001:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1004:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:845:24: danger: ‘pipe_down[0]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def2] tdb-1.4.13/bin/default/../../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’ tdb-1.4.13/bin/default/../../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:868:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:869:17: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)... tdb-1.4.13/bin/default/../../common/mutex.c:1001:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1001:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1004:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:845:24: danger: ‘pipe_down[1]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] tdb-1.4.13/bin/default/../../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’ tdb-1.4.13/bin/default/../../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:868:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:872:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:845:24: danger: ‘pipe_up[0]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] tdb-1.4.13/bin/default/../../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’ tdb-1.4.13/bin/default/../../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:868:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:872:15: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../common/mutex.c:845:24: danger: ‘pipe_up[1]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-688): [#def5] tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:114:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir("test.dir")’ where non-null expected tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:95:5: enter_function: entry to ‘test_readdir_os2_delete’ tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:104:9: call_function: calling ‘create_files’ from ‘test_readdir_os2_delete’ tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:104:9: return_function: returning to ‘test_readdir_os2_delete’ from ‘create_files’ tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:109:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:111:13: branch_false: ...to here tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:111:13: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../lib/replace/tests/os2_delete.c:114:14: danger: argument 1 (‘opendir("test.dir")’) from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected # 112| # 113| /* skip past . and .. */ # 114|-> de = readdir(d); # 115| strcmp(de->d_name, ".") == 0 || FAILED("match ."); # 116| de = readdir(d); Error: GCC_ANALYZER_WARNING (CWE-688): [#def6] tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:170:13: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:172:15: danger: argument 2 (‘x’) from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected # 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): [#def7] tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:271:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘x’ tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:271:15: danger: ‘x’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 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): [#def8] tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:279:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:270:13: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:273:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:278:13: branch_false: ...to here tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:278:13: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:279:15: danger: argument 1 (‘x’) from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected # 277| # 278| x = strndup("bla", 2); # 279|-> cmp = strcmp(x, "bl"); # 280| free(x); # 281| if (cmp != 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def9] tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1108:25: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’ tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1096:19: branch_true: following ‘true’ branch (when ‘i != 100’)... tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1097:22: branch_true: ...to here tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1097:22: acquire_resource: opened here tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1098:20: branch_false: following ‘false’ branch (when ‘fd != -1’)... tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1106:20: branch_false: ...to here tdb-1.4.13/bin/default/../../lib/replace/tests/testsuite.c:1108:25: danger: ‘fd’ leaks here; was opened at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 1106| if (fd >= 1000) { # 1107| printf("fd=%d\n", fd); # 1108|-> closefrom(3); # 1109| return false; # 1110| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def10] tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:868:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:869:17: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1001:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1001:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: danger: ‘pipe_down[0]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def11] tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:868:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:869:17: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: following ‘false’ branch (when ‘cleanup_ma == 0’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1001:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1001:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: danger: ‘pipe_down[1]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def12] tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:868:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:872:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: danger: ‘pipe_up[0]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-775): [#def13] tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:829:15: enter_function: entry to ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:844:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:848:9: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:851:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:855:9: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:859:12: branch_false: following ‘false’ branch (when ‘ptr != 18446744073709551615’)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:863:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:864:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:867:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:868:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:872:15: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:993:9: call_function: inlined call to ‘tdb_robust_mutex_wait_for_child’ from ‘tdb_runtime_check_for_robust_mutexes’ tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_true: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:995:12: branch_false: following ‘false’ branch (when ‘m’ is NULL)... tdb-1.4.13/bin/default/../../test/../common/mutex.c:998:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1004:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1007:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:13: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:1010:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/../common/mutex.c:1013:12: branch_false: ...to here tdb-1.4.13/bin/default/../../test/../common/mutex.c:845:24: danger: ‘pipe_up[1]’ leaks here # 843| # 844| if (initialized) { # 845|-> return tdb_mutex_locking_cached; # 846| } # 847| Error: GCC_ANALYZER_WARNING (CWE-476): [#def14] tdb-1.4.13/bin/default/../../test/external-agent.c:127:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘agent’ tdb-1.4.13/bin/default/../../test/external-agent.c:120:31: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../test/external-agent.c:122:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/external-agent.c:122:35: branch_false: ...to here tdb-1.4.13/bin/default/../../test/external-agent.c:122:13: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/external-agent.c:127:22: branch_false: ...to here tdb-1.4.13/bin/default/../../test/external-agent.c:127:9: danger: ‘agent’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 125| } # 126| # 127|-> agent->pid = fork(); # 128| if (agent->pid < 0) { # 129| fprintf(stderr, "fork failed: %s\n", strerror(errno)); Error: GCC_ANALYZER_WARNING (CWE-476): [#def15] tdb-1.4.13/bin/default/../../test/external-agent.c:186:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘string’ tdb-1.4.13/bin/default/../../test/external-agent.c:184:18: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../test/external-agent.c:186:9: danger: ‘string’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 184| string = malloc(len); # 185| # 186|-> string[0] = op; # 187| strncpy(string+1, name, len - 1); # 188| string[len-1] = '\0'; Error: GCC_ANALYZER_WARNING (CWE-476): [#def16] tdb-1.4.13/bin/default/../../test/lock-tracking.c:134:25: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘new’ tdb-1.4.13/bin/default/../../test/lock-tracking.c:30:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/lock-tracking.c:39:9: branch_false: ...to here tdb-1.4.13/bin/default/../../test/lock-tracking.c:54:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../test/lock-tracking.c:87:39: branch_false: ...to here tdb-1.4.13/bin/default/../../test/lock-tracking.c:92:37: branch_false: following ‘false’ branch (when ‘i’ is NULL)... tdb-1.4.13/bin/default/../../test/lock-tracking.c:112:20: branch_false: ...to here tdb-1.4.13/bin/default/../../test/lock-tracking.c:112:20: branch_false: following ‘false’ branch (when ‘i’ is NULL)... tdb-1.4.13/bin/default/../../test/lock-tracking.c:132:20: branch_false: ...to here tdb-1.4.13/bin/default/../../test/lock-tracking.c:132:20: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../test/lock-tracking.c:133:31: branch_true: ...to here tdb-1.4.13/bin/default/../../test/lock-tracking.c:133:31: acquire_memory: this call could return NULL tdb-1.4.13/bin/default/../../test/lock-tracking.c:134:25: danger: ‘new’ could be NULL: unchecked value from [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10) # 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: GCC_ANALYZER_WARNING (CWE-457): [#def17] tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:128:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_1_2[0]’ tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:127:12: branch_true: following ‘true’ branch (when ‘pid == 0’)... tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:128:26: branch_true: ...to here tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:128:26: danger: use of uninitialized value ‘pipes_1_2[0]’ here # 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): [#def18] tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:129:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_2_1[1]’ tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:127:12: branch_true: following ‘true’ branch (when ‘pid == 0’)... tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:128:26: branch_true: ...to here tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:129:26: danger: use of uninitialized value ‘pipes_2_1[1]’ here # 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): [#def19] tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:133:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_2_1[0]’ tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:127:12: branch_false: following ‘false’ branch (when ‘pid != 0’)... tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:133:26: branch_false: ...to here tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:133:26: danger: use of uninitialized value ‘pipes_2_1[0]’ here # 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): [#def20] tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:134:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pipes_1_2[1]’ tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:127:12: branch_false: following ‘false’ branch (when ‘pid != 0’)... tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:133:26: branch_false: ...to here tdb-1.4.13/bin/default/../../test/run-fcntl-deadlock.c:134:26: danger: use of uninitialized value ‘pipes_1_2[1]’ here # 132| } else { # 133| pipe_r = pipes_2_1[0]; # 134|-> pipe_w = pipes_1_2[1]; # 135| process = 1; # 136| alarm(15); Error: GCC_ANALYZER_WARNING (CWE-476): [#def21] tdb-1.4.13/bin/default/../../tools/tdbtorture.c:79:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:313:5: enter_function: entry to ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:328:17: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:364:25: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch... branch_false: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:373:31: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’ # 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): [#def22] tdb-1.4.13/bin/default/../../tools/tdbtorture.c:81:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘buf’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:313:5: enter_function: entry to ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:327:16: branch_true: following ‘true’ branch (when ‘c != -1’)... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:328:17: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:364:25: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:367:9: branch_false: following ‘false’ branch... branch_false: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:371:12: branch_true: following ‘true’ branch... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:373:31: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:373:31: call_function: calling ‘run_child’ from ‘main’ # 79| buf[i] = 'a' + (rand() % 26); # 80| } # 81|-> buf[i] = 0; # 82| return buf; # 83| } Error: GCC_ANALYZER_WARNING (CWE-688): [#def23] tdb-1.4.13/bin/default/../../tools/tdbtorture.c:361:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected tdb-1.4.13/bin/default/../../tools/tdbtorture.c:313:5: enter_function: entry to ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:361:9: danger: argument 1 (‘test_path("torture.tdb")’) NULL where non-null expected # 359| test_tdb = test_path("torture.tdb"); # 360| # 361|-> unlink(test_tdb); # 362| # 363| if (seed == -1) { Error: GCC_ANALYZER_WARNING (CWE-688): [#def24] tdb-1.4.13/bin/default/../../tools/tdbtorture.c:361:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘test_path("torture.tdb")’ where non-null expected tdb-1.4.13/bin/default/../../tools/tdbtorture.c:313:5: enter_function: entry to ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:361:9: danger: argument 1 (‘test_path("torture.tdb")’) from [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5) could be NULL where non-null expected # 359| test_tdb = test_path("torture.tdb"); # 360| # 361|-> unlink(test_tdb); # 362| # 363| if (seed == -1) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] tdb-1.4.13/bin/default/../../tools/tdbtorture.c:369:36: warning[-Wanalyzer-malloc-leak]: leak of ‘test_path("torture.tdb")’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:313:5: enter_function: entry to ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: call_function: calling ‘test_path’ from ‘main’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:359:20: return_function: returning to ‘main’ from ‘test_path’ tdb-1.4.13/bin/default/../../tools/tdbtorture.c:363:12: branch_true: following ‘true’ branch (when ‘seed == -1’)... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:364:25: branch_true: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:371:12: branch_false: following ‘false’ branch... tdb-1.4.13/bin/default/../../tools/tdbtorture.c:377:25: branch_false: ...to here tdb-1.4.13/bin/default/../../tools/tdbtorture.c:369:36: danger: ‘test_path("torture.tdb")’ leaks here; was allocated at [(6)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/5) # 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) { Error: CPPCHECK_WARNING (CWE-476): [#def26] tdb-1.4.13/lib/replace/tests/testsuite.c:172: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: x # 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: CPPCHECK_WARNING (CWE-476): [#def27] tdb-1.4.13/test/external-agent.c:127: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: agent # 125| } # 126| # 127|-> agent->pid = fork(); # 128| if (agent->pid < 0) { # 129| fprintf(stderr, "fork failed: %s\n", strerror(errno)); Error: CPPCHECK_WARNING (CWE-476): [#def28] tdb-1.4.13/test/external-agent.c:128: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: agent # 126| # 127| agent->pid = fork(); # 128|-> if (agent->pid < 0) { # 129| fprintf(stderr, "fork failed: %s\n", strerror(errno)); # 130| exit(1); Error: CPPCHECK_WARNING (CWE-476): [#def29] tdb-1.4.13/test/external-agent.c:186: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: 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 (CWE-682): [#def30] tdb-1.4.13/test/external-agent.c:187: error[nullPointerArithmeticOutOfMemory]: If memory allocation fail: pointer addition with NULL pointer. # 185| # 186| string[0] = op; # 187|-> strncpy(string+1, name, len - 1); # 188| string[len-1] = '\0'; # 189| Error: CPPCHECK_WARNING (CWE-476): [#def31] tdb-1.4.13/test/external-agent.c:188: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: string # 186| string[0] = op; # 187| strncpy(string+1, name, len - 1); # 188|-> string[len-1] = '\0'; # 189| # 190| if (write(agent->cmdfd, string, len) != len Error: CPPCHECK_WARNING (CWE-476): [#def32] tdb-1.4.13/test/lock-tracking.c:134: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: 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 (CWE-476): [#def33] tdb-1.4.13/test/lock-tracking.c:135: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new # 133| new = malloc(sizeof *new); # 134| new->off = fl->l_start; # 135|-> new->len = fl->l_len; # 136| new->type = fl->l_type; # 137| new->next = testlocks; Error: CPPCHECK_WARNING (CWE-476): [#def34] tdb-1.4.13/test/lock-tracking.c:136: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new # 134| new->off = fl->l_start; # 135| new->len = fl->l_len; # 136|-> new->type = fl->l_type; # 137| new->next = testlocks; # 138| testlocks = new; Error: CPPCHECK_WARNING (CWE-476): [#def35] tdb-1.4.13/test/lock-tracking.c:137: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new # 135| new->len = fl->l_len; # 136| new->type = fl->l_type; # 137|-> new->next = testlocks; # 138| testlocks = new; # 139| } Error: COMPILER_WARNING (CWE-252): [#def36] tdb-1.4.13/test/run-fcntl-deadlock.c: scope_hint: In function ‘expect_char’ tdb-1.4.13/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): [#def37] tdb-1.4.13/test/run-fcntl-deadlock.c: scope_hint: In function ‘send_char’ tdb-1.4.13/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): [#def38] tdb-1.4.13/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def39] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def40] tdb-1.4.13/test/run-mutex-allrecord-block.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def41] tdb-1.4.13/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): [#def42] tdb-1.4.13/test/run-mutex-allrecord-block.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def43] tdb-1.4.13/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): [#def44] tdb-1.4.13/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): [#def45] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def46] tdb-1.4.13/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def47] tdb-1.4.13/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): [#def48] tdb-1.4.13/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def49] tdb-1.4.13/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): [#def50] tdb-1.4.13/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): [#def51] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def52] tdb-1.4.13/test/run-mutex-openflags2.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def53] tdb-1.4.13/test/run-mutex-openflags2.c: scope_hint: In function ‘main’ tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def54] tdb-1.4.13/test/run-mutex-transaction1.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def55] tdb-1.4.13/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): [#def56] tdb-1.4.13/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): [#def57] tdb-1.4.13/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): [#def58] tdb-1.4.13/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): [#def59] tdb-1.4.13/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): [#def60] tdb-1.4.13/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): [#def61] tdb-1.4.13/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): [#def62] tdb-1.4.13/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): [#def63] tdb-1.4.13/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): [#def64] tdb-1.4.13/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): [#def65] tdb-1.4.13/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): [#def66] tdb-1.4.13/test/run-mutex-transaction1.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def67] tdb-1.4.13/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): [#def68] tdb-1.4.13/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): [#def69] tdb-1.4.13/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): [#def70] tdb-1.4.13/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): [#def71] tdb-1.4.13/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): [#def72] tdb-1.4.13/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): [#def73] tdb-1.4.13/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): [#def74] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def75] tdb-1.4.13/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): [#def76] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def77] tdb-1.4.13/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): [#def78] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def79] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def80] tdb-1.4.13/test/run-mutex-trylock.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def81] tdb-1.4.13/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): [#def82] tdb-1.4.13/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): [#def83] tdb-1.4.13/test/run-mutex-trylock.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def84] tdb-1.4.13/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): [#def85] tdb-1.4.13/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): [#def86] tdb-1.4.13/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): [#def87] tdb-1.4.13/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: COMPILER_WARNING (CWE-252): [#def88] tdb-1.4.13/test/run-mutex1.c: scope_hint: In function ‘do_child’ tdb-1.4.13/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): [#def89] tdb-1.4.13/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): [#def90] tdb-1.4.13/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): [#def91] tdb-1.4.13/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): [#def92] tdb-1.4.13/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): [#def93] tdb-1.4.13/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): [#def94] tdb-1.4.13/test/run-mutex1.c: scope_hint: In function ‘main’ tdb-1.4.13/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): [#def95] tdb-1.4.13/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): [#def96] tdb-1.4.13/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): [#def97] tdb-1.4.13/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): [#def98] tdb-1.4.13/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): [#def99] tdb-1.4.13/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): [#def100] tdb-1.4.13/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): [#def101] tdb-1.4.13/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 (CWE-476): [#def102] tdb-1.4.13/tools/tdbtorture.c:79: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf # 77| # 78| for (i=0;i<len;i++) { # 79|-> buf[i] = 'a' + (rand() % 26); # 80| } # 81| buf[i] = 0; Error: CPPCHECK_WARNING (CWE-476): [#def103] tdb-1.4.13/tools/tdbtorture.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: buf # 79| buf[i] = 'a' + (rand() % 26); # 80| } # 81|-> buf[i] = 0; # 82| return buf; # 83| }
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-223.us-west-2.compute.internal |
known-false-positives | /usr/share/csmock/known-false-positives.js |
known-false-positives-rpm | known-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | libtdb-1.4.13-2.fc43 |
store-results-to | /tmp/tmpsyiy43vr/libtdb-1.4.13-2.fc43.tar.xz |
time-created | 2025-04-25 14:16:19 |
time-finished | 2025-04-25 14:20:12 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpsyiy43vr/libtdb-1.4.13-2.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsyiy43vr/libtdb-1.4.13-2.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |