diff options
author | Mattias Andrée <maandree@kth.se> | 2021-12-10 21:28:49 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-12-10 21:28:49 +0100 |
commit | ee22267ae381eb3274aff3a6c6d1b0ab6efe53d2 (patch) | |
tree | fd2cd355db5022a2df4b47d56e6326736bf88046 /lseek.c | |
parent | Add liberror_setenv_failed (diff) | |
download | liberror-libc-ee22267ae381eb3274aff3a6c6d1b0ab6efe53d2.tar.gz liberror-libc-ee22267ae381eb3274aff3a6c6d1b0ab6efe53d2.tar.bz2 liberror-libc-ee22267ae381eb3274aff3a6c6d1b0ab6efe53d2.tar.xz |
Fix warnings
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | lseek.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -77,9 +77,9 @@ liberror_lseek_short(int fd, _liberror_off_t offset, int whence, _liberror_uoff_ struct liberror_error *error; int saved_errno = errno; liberror_save_backtrace(NULL); - if (returned < 0 || (size_t)returned < min) { + if (returned < 0 || (_liberror_uoff_t)returned < min) { desc = "Seek resulted in a new offset in an earlier position than expected"; - } else if (returned > max) { + } else if ((_liberror_uoff_t)returned > max) { desc = "Seek resulted in a new offset in an beyond the expectation"; } else { desc = "Seek resulted in an unexpected new offset"; @@ -91,6 +91,8 @@ liberror_lseek_short(int fd, _liberror_off_t offset, int whence, _liberror_uoff_ error->details.one_file.name = fname ? strdup(fname) : NULL; error->details.one_file.role = "Seekable file"; errno = saved_errno; + (void) offset; + (void) whence; } |