]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
uu: Fix Visual Studio compiler warning (#2180)
authorTobias Stoeckmann <stoeckmann@users.noreply.github.com>
Sat, 11 May 2024 17:06:04 +0000 (19:06 +0200)
committerGitHub <noreply@github.com>
Sat, 11 May 2024 17:06:04 +0000 (10:06 -0700)
Switch from int64_t to ssize_t for l and body, which is a no-op on 64
bit systems. On 32 bit systems, this change is okay because these
variables interact with other ssize_t variables in this scope.

Fixes compiler warning regarding line 584 in which ssize_t and int64_t
are mixed in calculations:

warning C4244: '=': conversion from 'int64_t' to 'long'

libarchive/archive_read_support_filter_uu.c

index 7563e861e219c00a0fc38baac7760c071e7d77bd..8d361a4f8e7608f20567b5a3c97aae2494acfef6 100644 (file)
@@ -506,7 +506,7 @@ read_more:
                uudecode->in_cnt = 0;
        }
        for (;used < avail_in; d += llen, used += llen) {
-               int64_t l, body;
+               ssize_t l, body;
 
                b = d;
                len = get_line(b, avail_in - used, &nl);