aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-08-22 11:24:46 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2021-08-22 15:44:57 +0200
commit922b58b3e4a26377b5b65c56eec0ac93d80a6fc7 (patch)
treedad1607c8271c9a82efa101827e977356154e036
parent1e7ca1859112333e3fb8d31dc715a4e4d5af5788 (diff)
downloadbusybox-w32-922b58b3e4a26377b5b65c56eec0ac93d80a6fc7.tar.gz
busybox-w32-922b58b3e4a26377b5b65c56eec0ac93d80a6fc7.tar.bz2
busybox-w32-922b58b3e4a26377b5b65c56eec0ac93d80a6fc7.zip
tar,smemcap: silence compiler warning
gcc 11.2.1 complains that the tar header checksum might overflow the checksum field. It won't and using an unsigned int for the calculation seems to convince the compiler too. Signed-off-by: Ron Yorston <rmy@pobox.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--archival/chksum_and_xwrite_tar_header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archival/chksum_and_xwrite_tar_header.c b/archival/chksum_and_xwrite_tar_header.c
index 25934f898..f2d46b9ef 100644
--- a/archival/chksum_and_xwrite_tar_header.c
+++ b/archival/chksum_and_xwrite_tar_header.c
@@ -15,7 +15,7 @@ void FAST_FUNC chksum_and_xwrite_tar_header(int fd, struct tar_header_t *hp)
15 * (Sun and HP-UX gets it wrong... more details in 15 * (Sun and HP-UX gets it wrong... more details in
16 * GNU tar source) */ 16 * GNU tar source) */
17 const unsigned char *cp; 17 const unsigned char *cp;
18 int chksum, size; 18 unsigned int chksum, size;
19 19
20 strcpy(hp->magic, "ustar "); 20 strcpy(hp->magic, "ustar ");
21 21