Skip to content
Browse files

fix up some compiler warnings

Yeah, we just ignore these return values, but really, what can we do
with them if we check for them?

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information...
1 parent 3aa29c9 commit a1a658361dbc73b5a7feed58faa3875f62ba8ca4 @gregkh committed
Showing with 9 additions and 4 deletions.
  1. +9 −4 bti.c
View
13 bti.c
@@ -887,7 +887,6 @@ static char *get_string_from_stdin(void)
static void read_password(char *buf, size_t len, char *host)
{
char pwd[80];
- int retval;
struct termios old;
struct termios tp;
@@ -900,7 +899,13 @@ static void read_password(char *buf, size_t len, char *host)
fprintf(stdout, "Enter password for %s: ", host);
fflush(stdout);
tcflow(0, TCOOFF);
- retval = scanf("%79s", pwd);
+
+ /*
+ * I'd like to do something with the return value here, but really,
+ * what can be done?
+ */
+ (void)scanf("%79s", pwd);
+
tcflow(0, TCOON);
fprintf(stdout, "\n");
@@ -1048,11 +1053,11 @@ static int popenRWE(int *rwepipe, const char *exe, const char *const argv[])
static int pcloseRWE(int pid, int *rwepipe)
{
- int rc, status;
+ int status;
close(rwepipe[0]);
close(rwepipe[1]);
close(rwepipe[2]);
- rc = waitpid(pid, &status, 0);
+ (void)waitpid(pid, &status, 0);
return status;
}

0 comments on commit a1a6583

Please sign in to comment.
Something went wrong with that request. Please try again.