From: H. Peter Anvin Date: Wed, 16 Mar 2011 20:10:36 +0000 (-0700) Subject: com32/rosh/rosh.c: remove variables set but not used X-Git-Tag: syslinux-4.04-pre13~2^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=824437efc8bb66c7923d00d8cb4daec7d6740d08;p=profile%2Fivi%2Fsyslinux.git com32/rosh/rosh.c: remove variables set but not used gcc 4.6 warns on variables set but not used, so remove them. Signed-off-by: H. Peter Anvin --- diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c index 0581087..68dad3f 100644 --- a/com32/rosh/rosh.c +++ b/com32/rosh/rosh.c @@ -555,7 +555,6 @@ int rosh_ls_de_size(const char *filestr, struct dirent *de) char filestr2[ROSH_PATH_SZ]; int fd2, file2pos; struct stat fdstat; - int status; filestr2[0] = 0; file2pos = -1; @@ -566,7 +565,7 @@ int rosh_ls_de_size(const char *filestr, struct dirent *de) } strcpy(filestr2 + file2pos + 1, de->d_name); fd2 = open(filestr2, O_RDONLY); - status = fstat(fd2, &fdstat); + fstat(fd2, &fdstat); fd2 = close(fd2); de_size = (int)fdstat.st_size; return de_size; @@ -602,6 +601,7 @@ int rosh_ls_de_size_mode(const char *filestr, struct dirent *de, mode_t * st_mod errno = 0; ROSH_DEBUG2("stat(%s) ", filestr2); status = stat(filestr2, &fdstat); + (void)status; ROSH_DEBUG2("\t--stat()=%d\terr=%d\n", status, errno); if (errno) { rosh_error(errno, "ls:szmd.stat", de->d_name); @@ -987,13 +987,12 @@ void rosh_more_buf(char *buf, int buflen, int rows, int cols, char *scrbuf) void rosh_more_fd(int fd, int rows, int cols, char *scrbuf) { struct stat fdstat; - int status; char *buf; int bufpos; int numrd; FILE *f; - status = fstat(fd, &fdstat); + fstat(fd, &fdstat); if (S_ISREG(fdstat.st_mode)) { buf = malloc((int)fdstat.st_size); if (buf != NULL) {