Quiet two clang analyzer false positives.

This commit is contained in:
Todd C. Miller
2022-06-03 11:05:34 -06:00
parent f19a71a3db
commit aee276ea63
2 changed files with 4 additions and 0 deletions

View File

@@ -1503,6 +1503,7 @@ listener_cb(int fd, int what, void *v)
int sock; int sock;
debug_decl(listener_cb, SUDO_DEBUG_UTIL); debug_decl(listener_cb, SUDO_DEBUG_UTIL);
memset(&sa_un, 0, sizeof(sa_un));
sock = accept(fd, &sa_un.sa, &salen); sock = accept(fd, &sa_un.sa, &salen);
if (sock != -1) { if (sock != -1) {
if (logsrvd_conf_server_tcp_keepalive()) { if (logsrvd_conf_server_tcp_keepalive()) {

View File

@@ -574,6 +574,9 @@ print_cmndspec_csv(FILE *fp, struct sudoers_parse_tree *parse_tree,
} }
} }
#endif /* HAVE_PRIV_SET */ #endif /* HAVE_PRIV_SET */
#ifdef __clang_analyzer__
(void)&need_comma;
#endif
putc('"', fp); putc('"', fp);
putc(',', fp); putc(',', fp);