diff options
author | Daniel Schemmel <daniel@schemmel.net> | 2023-03-22 23:00:09 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2023-03-23 21:30:59 +0000 |
commit | 76f05738dd0aaedd174af4d12dd37dd42836f47f (patch) | |
tree | f314dc1484827e8587d02aa18fa82acc00b823e7 /runtime/POSIX | |
parent | 0ca2dc8176a08a0d4fcaa90807e770a5809d95cf (diff) | |
download | klee-76f05738dd0aaedd174af4d12dd37dd42836f47f.tar.gz |
fix unused variable warning
Diffstat (limited to 'runtime/POSIX')
-rw-r--r-- | runtime/POSIX/fd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/runtime/POSIX/fd.c b/runtime/POSIX/fd.c index 0aba0ade..be13a40b 100644 --- a/runtime/POSIX/fd.c +++ b/runtime/POSIX/fd.c @@ -830,8 +830,6 @@ int __fd_getdents(unsigned int fd, struct dirent64 *dirp, unsigned int count) { return bytes; } else { off64_t os_pos = f->off - 4096; - int res; - off64_t s = 0; /* For reasons which I really don't understand, if I don't memset this then sometimes the kernel returns d_ino==0 for @@ -841,9 +839,10 @@ int __fd_getdents(unsigned int fd, struct dirent64 *dirp, unsigned int count) { Even more bizarre, interchanging the memset and the seek also case strange behavior. Really should be debugged properly. */ memset(dirp, 0, count); - s = syscall(__NR_lseek, f->fd, os_pos, SEEK_SET); + off64_t s = syscall(__NR_lseek, f->fd, os_pos, SEEK_SET); + (void)s; assert(s != (off64_t) -1); - res = syscall(__NR_getdents64, f->fd, dirp, count); + int res = syscall(__NR_getdents64, f->fd, dirp, count); if (res > -1) { int pos = 0; f->off = syscall(__NR_lseek, f->fd, 0, SEEK_CUR); |