From c70694bd8f40a6e0aee38b9d0be821ab18f4db33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 21 Jan 2021 12:15:40 +0100 Subject: [PATCH] =?UTF-8?q?client:=20explicitly=20use=20a=2064-bit=20type?= =?UTF-8?q?=20for=20=E2=80=98total=5Flen=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes an out-of-range comparison in 32-bit builds: client.c:289:19: error: result of comparison of constant 4294967296 with expression of type 'size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare] if (total_len >= 1llu << (8 * sizeof(uint32_t)) || ~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client.c b/client.c index cb24ab12..c4a36f74 100644 --- a/client.c +++ b/client.c @@ -263,7 +263,7 @@ main(int argc, char *const *argv) }; /* Total packet length, not (yet) including argv[] */ - size_t total_len = ( + uint64_t total_len = ( sizeof(data) + cwd_len + term_len +