1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-12 23:48:51 +03:00

Fix -Wdeprecated-declarations

Fixes https://github.com/rui314/mold/issues/816
This commit is contained in:
Rui Ueyama 2022-10-24 06:16:02 +08:00
parent ce35e19c6d
commit 4fa41e1ad4

4
tar.cc
View File

@ -24,8 +24,8 @@ struct UstarHeader {
int sum = 0;
for (i64 i = 0; i < sizeof(*this); i++)
sum += ((u8 *)this)[i];
assert(sum < 1000000);
sprintf(checksum, "%06o", sum);
assert(sum < 01000000);
snprintf(checksum, sizeof(checksum), "%06o", sum);
}
char name[100];