aboutsummaryrefslogtreecommitdiffstats
path: root/lseek.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-12-10 21:28:49 +0100
committerMattias Andrée <maandree@kth.se>2021-12-10 21:28:49 +0100
commitee22267ae381eb3274aff3a6c6d1b0ab6efe53d2 (patch)
treefd2cd355db5022a2df4b47d56e6326736bf88046 /lseek.c
parentAdd liberror_setenv_failed (diff)
downloadliberror-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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lseek.c b/lseek.c
index 7b1dc90..53f46e1 100644
--- a/lseek.c
+++ b/lseek.c
@@ -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;
}