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>
This commit is contained in:
parent
1e7ca18591
commit
922b58b3e4
@ -15,7 +15,7 @@ void FAST_FUNC chksum_and_xwrite_tar_header(int fd, struct tar_header_t *hp)
|
|||||||
* (Sun and HP-UX gets it wrong... more details in
|
* (Sun and HP-UX gets it wrong... more details in
|
||||||
* GNU tar source) */
|
* GNU tar source) */
|
||||||
const unsigned char *cp;
|
const unsigned char *cp;
|
||||||
int chksum, size;
|
unsigned int chksum, size;
|
||||||
|
|
||||||
strcpy(hp->magic, "ustar ");
|
strcpy(hp->magic, "ustar ");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user