aboutsummaryrefslogtreecommitdiffstats
path: root/send.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 /send.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 'send.c')
-rw-r--r--send.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/send.c b/send.c
index e79f562..62c12a7 100644
--- a/send.c
+++ b/send.c
@@ -142,6 +142,9 @@ liberror_send_failed(int fd, const void *buf, size_t n, int flags, const char *f
break;
}
liberror_libc_set_error_one_file(desc, "send", "Socket file", fd, fname);
+ (void) buf;
+ (void) n;
+ (void) flags;
}
@@ -154,7 +157,7 @@ liberror_send_short(int fd, const void *buf, size_t n, int flags, size_t min, si
liberror_save_backtrace(NULL);
if (returned < 0 || (size_t)returned < min) {
desc = "Sent message was shorter than expected";
- } else if (returned > max) {
+ } else if ((size_t)returned > max) {
desc = "Sent message was larger than expected";
} else {
desc = "Sent message was of an unexpected size";
@@ -166,6 +169,9 @@ liberror_send_short(int fd, const void *buf, size_t n, int flags, size_t min, si
error->details.one_file.name = fname ? strdup(fname) : NULL;
error->details.one_file.role = "Socket file";
errno = saved_errno;
+ (void) buf;
+ (void) n;
+ (void) flags;
}