Mark functions not returning as sudo_noreturn

We also put NOTREACHED where it applies.
This commit is contained in:
Rose
2023-07-01 14:04:22 -04:00
parent 97e574091a
commit 45fdfa18f1
24 changed files with 47 additions and 35 deletions

View File

@@ -201,7 +201,7 @@ main(int argc, char *argv[])
break;
default:
usage();
break;
/* NOTREACHED */
}
}
argc -= optind;
@@ -731,7 +731,7 @@ testsudoers_error(const char *buf)
return fputs(buf, stderr);
}
static void
sudo_noreturn static void
usage(void)
{
(void) fprintf(stderr, "usage: %s [-dt] [-G sudoers_gid] [-g group] [-h host] [-i input_format] [-P grfile] [-p pwfile] [-U sudoers_uid] [-u user] <user> <command> [args]\n", getprogname());