From 6115fb5d48698b356a3a2f0ce7cc59cb89ddf63c Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Thu, 15 Jun 1995 03:41:25 +0000 Subject: [PATCH] added void casts where appropriate --- testsudoers.c | 18 +++++++++--------- visudo.c | 10 +++++----- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/testsudoers.c b/testsudoers.c index c31fc55fd..79ddfa2c8 100644 --- a/testsudoers.c +++ b/testsudoers.c @@ -137,7 +137,7 @@ main(argc, argv) #endif if (argc != 4) { - fprintf(stderr, "usage: %s \n", argv[0]); + (void) fprintf(stderr, "usage: %s \n", argv[0]); exit(1); } @@ -153,21 +153,21 @@ main(argc, argv) load_interfaces(); if (yyparse() || parse_error) { - printf("doesn't parse.\n"); + (void) printf("doesn't parse.\n"); } else { - printf("parses OK.\n\n"); + (void) printf("parses OK.\n\n"); if (top == 0) - printf("User %s not found\n", user); + (void) printf("User %s not found\n", user); else while (top) { - printf("[%d]\n", top-1); - printf("user_match: %d\n", user_matches); - printf("host_match: %d\n", host_matches); - printf("cmnd_match: %d\n", cmnd_matches); + (void) printf("[%d]\n", top-1); + (void) printf("user_match: %d\n", user_matches); + (void) printf("host_match: %d\n", host_matches); + (void) printf("cmnd_match: %d\n", cmnd_matches); top--; } } /* dump aliases */ - printf("Matching Aliases --\n"); + (void) printf("Matching Aliases --\n"); dumpaliases(); } diff --git a/visudo.c b/visudo.c index 288f3589c..32794c01d 100644 --- a/visudo.c +++ b/visudo.c @@ -391,7 +391,7 @@ static char whatnow() do { ok = FALSE; - printf("What now? "); + (void) printf("What now? "); if ((choice = fgetc(stdin)) != '\n') while (fgetc(stdin) != '\n') ; @@ -418,10 +418,10 @@ static char whatnow() */ static void whatnow_help() { - printf("Options are:\n"); - printf(" (e)dit sudoers file again\n"); - 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("Options are:\n"); + (void) printf(" (e)dit sudoers file again\n"); + (void) printf(" e(x)it without saving changes to sudoers file\n"); + (void) printf(" (q)uit and save changes to sudoers file (DANGER!)\n\n"); }