From f65b05f2d540e8560fde374c206f872e24436e32 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 24 Apr 2022 11:04:58 +0100 Subject: fdio: Match signedness of length parameter This is documented as taking a length of -1, but the parameter is unsigned, so it's more correctly ((gsize) -1). This silences a warning from gcc -Wsign-compare. Signed-off-by: Simon McVittie --- glnx-fdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glnx-fdio.c b/glnx-fdio.c index c601f08..ee69aa1 100644 --- a/glnx-fdio.c +++ b/glnx-fdio.c @@ -1130,7 +1130,7 @@ glnx_file_replace_contents_with_perms_at (int dfd, &tmpf, error)) return FALSE; - if (len == -1) + if (len == (gsize) -1) len = strlen ((char*)buf); if (!glnx_try_fallocate (tmpf.fd, 0, len, error)) -- cgit v1.2.1