diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 03:07:22 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-10-01 03:07:22 +0200 |
commit | 4a0eb0370c4df8ee01973b50bb460560532b79f1 (patch) | |
tree | ce2324f97b05ae50355961d47dea6cd003a4fc05 /archival | |
parent | aaa0709e7b39d0dc22ac92443a86c84eaff58679 (diff) | |
download | busybox-4a0eb0370c4df8ee01973b50bb460560532b79f1.tar.gz |
gcc-9.x warning fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival')
-rw-r--r-- | archival/tar.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/archival/tar.c b/archival/tar.c index 4ab38db29..4f2564813 100644 --- a/archival/tar.c +++ b/archival/tar.c @@ -297,7 +297,8 @@ static void writeLongname(int fd, int type, const char *name, int dir) header.typeflag = type; strcpy(header.name, "././@LongLink"); /* This sets mode/uid/gid/mtime to "00...00<NUL>" strings */ - memset(header.mode, '0', sizeof(struct prefilled)); + memset((char*)&header + offsetof(struct tar_header_t, mode), /* make gcc-9.x happy */ + '0', sizeof(struct prefilled)); header.mode [sizeof(header.mode ) - 1] = '\0'; header.uid [sizeof(header.uid ) - 1] = '\0'; header.gid [sizeof(header.gid ) - 1] = '\0'; |