mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
client: explicitly use a 64-bit type for ‘total_len’
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)) ||
~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
parent
73522cec27
commit
0bb928e02f
1 changed files with 1 additions and 1 deletions
2
client.c
2
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 +
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue