From: Richard Jones Date: Mon, 15 Feb 2010 15:55:38 +0000 (+0000) Subject: Remove some unused variables. X-Git-Tag: 1.0.85~20 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=1f0f0df9b19520979857ab42b192ba46e0bc36dd;p=libguestfs.git Remove some unused variables. Since we have to compile with -Wno-unused-variables, we don't spot unused variables in code. I found these by compiling the code in Ubuntu. --- diff --git a/fuse/guestmount.c b/fuse/guestmount.c index df11619..b4a917f 100644 --- a/fuse/guestmount.c +++ b/fuse/guestmount.c @@ -927,7 +927,7 @@ main (int argc, char *argv[]) struct mp *mps = NULL; struct mp *mp; char *p; - int c, i, r; + int c, r; int option_index; struct sigaction sa; diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c index 51d8cfb..a8ac0e1 100644 --- a/hivex/hivexsh.c +++ b/hivex/hivexsh.c @@ -184,7 +184,6 @@ main (int argc, char *argv[]) char *cmd = buf; char *args; - size_t i = 0; if (buf[len] == '\0') { /* This is mostly safe. Although the cmd_* functions do sometimes diff --git a/src/guestfs.c b/src/guestfs.c index 3c00114..0e91b96 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -1578,7 +1578,7 @@ print_timestamped_message (guestfs_h *g, const char *fs, ...) va_list args; char *msg; int err; - struct timeval tv, diff; + struct timeval tv; va_start (args, fs); err = vasprintf (&msg, fs, args); @@ -2633,7 +2633,6 @@ guestfs___recv_file (guestfs_h *g, const char *filename) { void *buf; int fd, r; - size_t len; fd = open (filename, O_WRONLY|O_CREAT|O_TRUNC|O_NOCTTY, 0666); if (fd == -1) {