Task #132790 - fixed.err

back to task #132790
download
Error: COMPILER_WARNING (CWE-252):
screen-5.0.1/screen.c: scope_hint: In function ‘main’
screen-5.0.1/screen.c:858:39: warning[-Wunused-result]: ignoring return value of ‘chown’ declared with attribute ‘warn_unused_result’
#  858 |                                 (void)chown(SocketPath, real_uid, real_gid);
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  856|   				if (mkdir(SocketPath, 0700) == -1 && errno != EEXIST)
#  857|   					Panic(errno, "Cannot make directory '%s'", SocketPath);
#  858|-> 				(void)chown(SocketPath, real_uid, real_gid);
#  859|   			}
#  860|   		}

Error: GCC_ANALYZER_WARNING (CWE-476):
screen-5.0.1/window.c:2008:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘w’
screen-5.0.1/window.c:1993:12: branch_true: following ‘true’ branch...
screen-5.0.1/window.c:1994:29: branch_true: ...to here
screen-5.0.1/window.c:1993:13: branch_true: following ‘true’ branch...
screen-5.0.1/window.c:1997:22: branch_true: ...to here
screen-5.0.1/window.c:1997:20: branch_true: following ‘true’ branch...
screen-5.0.1/window.c:1997:20: branch_true: ...to here
screen-5.0.1/window.c:2000:32: branch_true: following ‘true’ branch...
screen-5.0.1/window.c:2008:21: danger: dereference of NULL ‘w’
# 2006|   				w = w->w_prev;
# 2007|   		}
# 2008|-> 		if (w->w_number == n)
# 2009|   			return w;
# 2010|   	}