libtdb-1.4.12-3.fc42

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1]
libtdb-1.4.12-build/tdb-1.4.12/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[0]’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def2]
libtdb-1.4.12-build/tdb-1.4.12/common/mutex.c: scope_hint: In function ‘tdb_runtime_check_for_robust_mutexes’
libtdb-1.4.12-build/tdb-1.4.12/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_down[1]’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def3]
libtdb-1.4.12-build/tdb-1.4.12/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[0]’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def4]
libtdb-1.4.12-build/tdb-1.4.12/common/mutex.c:845:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘pipe_up[1]’
libtdb-1.4.12-build/tdb-1.4.12/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-688): [#def5]
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/tests/os2_delete.c: scope_hint: In function ‘test_readdir_os2_delete’
libtdb-1.4.12-build/tdb-1.4.12/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.12-build/tdb-1.4.12/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: GCC_ANALYZER_WARNING (CWE-688): [#def6]
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strdup’
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/tests/testsuite.c:172:15: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘x’ where non-null expected
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/replace.h:176: included_from: Included from here.
libtdb-1.4.12-build/tdb-1.4.12/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): [#def7]
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_strndup’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def8]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def9]
libtdb-1.4.12-build/tdb-1.4.12/lib/replace/tests/testsuite.c: scope_hint: In function ‘test_closefrom’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def10]
libtdb-1.4.12-build/tdb-1.4.12/test/external-agent.c: scope_hint: In function ‘prepare_external_agent’
libtdb-1.4.12-build/tdb-1.4.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def11]
libtdb-1.4.12-build/tdb-1.4.12/test/external-agent.c: scope_hint: In function ‘external_agent_operation’
libtdb-1.4.12-build/tdb-1.4.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def12]
libtdb-1.4.12-build/tdb-1.4.12/test/lock-tracking.c: scope_hint: In function ‘fcntl_with_lockcheck’
libtdb-1.4.12-build/tdb-1.4.12/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: COMPILER_WARNING (CWE-252): [#def13]
libtdb-1.4.12-build/tdb-1.4.12/test/run-fcntl-deadlock.c: scope_hint: In function ‘expect_char’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def14]
libtdb-1.4.12-build/tdb-1.4.12/test/run-fcntl-deadlock.c: scope_hint: In function ‘send_char’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def15]
libtdb-1.4.12-build/tdb-1.4.12/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def16]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def17]
libtdb-1.4.12-build/tdb-1.4.12/test/run-fcntl-deadlock.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def18]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def19]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def20]
libtdb-1.4.12-build/tdb-1.4.12/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: COMPILER_WARNING (CWE-252): [#def21]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-allrecord-block.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def22]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def23]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-allrecord-block.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def24]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def25]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def26]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def27]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def28]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def29]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-allrecord-trylock.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def30]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def31]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def32]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def33]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-openflags2.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def34]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-openflags2.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def35]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-transaction1.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def36]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def37]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def38]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def39]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def40]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def41]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def42]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def43]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def44]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def45]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def46]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def47]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-transaction1.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def48]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def49]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def50]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def51]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def52]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def53]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def54]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def55]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def56]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def57]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def58]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def59]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def60]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def61]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-trylock.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def62]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def63]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def64]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex-trylock.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def65]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def66]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def67]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def68]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def69]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex1.c: scope_hint: In function ‘do_child’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def70]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def71]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def72]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def73]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def74]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def75]
libtdb-1.4.12-build/tdb-1.4.12/test/run-mutex1.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def76]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def77]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def78]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def79]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def80]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def81]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def82]
libtdb-1.4.12-build/tdb-1.4.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def83]
libtdb-1.4.12-build/tdb-1.4.12/tools/tdbtorture.c: scope_hint: In function ‘randbuf’
libtdb-1.4.12-build/tdb-1.4.12/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): [#def84]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def85]
libtdb-1.4.12-build/tdb-1.4.12/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): [#def86]
libtdb-1.4.12-build/tdb-1.4.12/tools/tdbtorture.c: scope_hint: In function ‘main’
libtdb-1.4.12-build/tdb-1.4.12/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.12-build/tdb-1.4.12/lib/replace/replace.h:172: included_from: Included from here.
libtdb-1.4.12-build/tdb-1.4.12/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): [#def87]
libtdb-1.4.12-build/tdb-1.4.12/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-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-32.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibtdb-1.4.12-3.fc42
store-results-to/tmp/tmpx17dqolu/libtdb-1.4.12-3.fc42.tar.xz
time-created2024-11-13 01:47:18
time-finished2024-11-13 01:51:44
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpx17dqolu/libtdb-1.4.12-3.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpx17dqolu/libtdb-1.4.12-3.fc42.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9