aboutsummaryrefslogtreecommitdiffstats
path: root/com32/rosh
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-03-16 13:10:36 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-03-16 13:10:36 -0700
commit824437efc8bb66c7923d00d8cb4daec7d6740d08 (patch)
tree5ad532b43ea51bd605f50be6c01b768d17fab8f3 /com32/rosh
parent903c3835dc9f92722606964a4215cb4035698865 (diff)
downloadsyslinux-824437efc8bb66c7923d00d8cb4daec7d6740d08.tar.gz
syslinux-824437efc8bb66c7923d00d8cb4daec7d6740d08.tar.xz
syslinux-824437efc8bb66c7923d00d8cb4daec7d6740d08.zip
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 <hpa@zytor.com>
Diffstat (limited to 'com32/rosh')
-rw-r--r--com32/rosh/rosh.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/com32/rosh/rosh.c b/com32/rosh/rosh.c
index 0581087e..68dad3f3 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) {