From ee22267ae381eb3274aff3a6c6d1b0ab6efe53d2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 10 Dec 2021 21:28:49 +0100 Subject: Fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- recv.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'recv.c') diff --git a/recv.c b/recv.c index 7d1af35..831850a 100644 --- a/recv.c +++ b/recv.c @@ -109,6 +109,9 @@ liberror_recv_failed(int fd, void *buf, size_t n, int flags, const char *fname) break; } liberror_libc_set_error_one_file(desc, "recv", "Socket file", fd, fname); + (void) buf; + (void) n; + (void) flags; } @@ -121,7 +124,7 @@ liberror_recv_short(int fd, void *buf, size_t n, int flags, size_t min, size_t m liberror_save_backtrace(NULL); if (returned < 0 || (size_t)returned < min) { desc = "Received message was shorter than expected"; - } else if (returned > max) { + } else if ((size_t) returned > max) { desc = "Received message was larger than expected"; } else { desc = "Received message was of an unexpected size"; @@ -133,6 +136,9 @@ liberror_recv_short(int fd, void *buf, size_t n, int flags, size_t min, size_t m 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; } -- cgit v1.2.3-70-g09d2