2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-29 13:28:10 +00:00

added void casts where appropriate

This commit is contained in:
Todd C. Miller 1995-06-15 03:41:25 +00:00
parent a81984983f
commit 6115fb5d48
2 changed files with 14 additions and 14 deletions

View File

@ -137,7 +137,7 @@ main(argc, argv)
#endif #endif
if (argc != 4) { if (argc != 4) {
fprintf(stderr, "usage: %s <command> <user> <host>\n", argv[0]); (void) fprintf(stderr, "usage: %s <command> <user> <host>\n", argv[0]);
exit(1); exit(1);
} }
@ -153,21 +153,21 @@ main(argc, argv)
load_interfaces(); load_interfaces();
if (yyparse() || parse_error) { if (yyparse() || parse_error) {
printf("doesn't parse.\n"); (void) printf("doesn't parse.\n");
} else { } else {
printf("parses OK.\n\n"); (void) printf("parses OK.\n\n");
if (top == 0) if (top == 0)
printf("User %s not found\n", user); (void) printf("User %s not found\n", user);
else while (top) { else while (top) {
printf("[%d]\n", top-1); (void) printf("[%d]\n", top-1);
printf("user_match: %d\n", user_matches); (void) printf("user_match: %d\n", user_matches);
printf("host_match: %d\n", host_matches); (void) printf("host_match: %d\n", host_matches);
printf("cmnd_match: %d\n", cmnd_matches); (void) printf("cmnd_match: %d\n", cmnd_matches);
top--; top--;
} }
} }
/* dump aliases */ /* dump aliases */
printf("Matching Aliases --\n"); (void) printf("Matching Aliases --\n");
dumpaliases(); dumpaliases();
} }

View File

@ -391,7 +391,7 @@ static char whatnow()
do { do {
ok = FALSE; ok = FALSE;
printf("What now? "); (void) printf("What now? ");
if ((choice = fgetc(stdin)) != '\n') if ((choice = fgetc(stdin)) != '\n')
while (fgetc(stdin) != '\n') while (fgetc(stdin) != '\n')
; ;
@ -418,10 +418,10 @@ static char whatnow()
*/ */
static void whatnow_help() static void whatnow_help()
{ {
printf("Options are:\n"); (void) printf("Options are:\n");
printf(" (e)dit sudoers file again\n"); (void) printf(" (e)dit sudoers file again\n");
printf(" e(x)it without saving changes to sudoers file\n"); (void) printf(" e(x)it without saving changes to sudoers file\n");
printf(" (q)uit and save changes to sudoers file (DANGER!)\n\n"); (void) printf(" (q)uit and save changes to sudoers file (DANGER!)\n\n");
} }