From 48b7c4478488046e190f8c9e5fa6bd4ddfb1018e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 1 Nov 2024 00:14:01 +0100 Subject: Cast 1 to appropriate type --- src/work.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/work.c') diff --git a/src/work.c b/src/work.c index 1ef699d..85cdbce 100644 --- a/src/work.c +++ b/src/work.c @@ -125,7 +125,7 @@ process_file(const char *locl_filename, unsigned char **locl_buf) for (;;) { ptrdiff_t want = nw + st.st_blksize; if (want > basecap) { - if (want & (1 << (PTRDIFF_WIDTH - 1))) { + if (want & ((ptrdiff_t)1 << (PTRDIFF_WIDTH - 1))) { errno = EOVERFLOW; cerr(EXIT_FATAL, "%s:", __func__); } -- cgit v1.2.3