CPack: Avoid "format expects 'unsigned int'" warnings
Cast sprintf uid and gid arguments to match the type expected by their "%-6u" format strings.
This commit is contained in:
parent
aa16a433d3
commit
0fca154344
|
@ -771,13 +771,13 @@ static int put_arobj(CF *cfp, struct stat *sb)
|
||||||
}
|
}
|
||||||
if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
|
if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
|
||||||
(void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname,
|
(void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname,
|
||||||
(long int)sb->st_mtime, uid, gid, sb->st_mode,
|
(long int)sb->st_mtime, (unsigned)uid, (unsigned)gid,
|
||||||
(long long)sb->st_size + lname, ARFMAG);
|
sb->st_mode, (long long)sb->st_size + lname, ARFMAG);
|
||||||
else {
|
else {
|
||||||
lname = 0;
|
lname = 0;
|
||||||
(void)sprintf(ar_hb, HDR2, name,
|
(void)sprintf(ar_hb, HDR2, name,
|
||||||
(long int)sb->st_mtime, uid, gid, sb->st_mode,
|
(long int)sb->st_mtime, (unsigned)uid, (unsigned)gid,
|
||||||
(long long)sb->st_size, ARFMAG);
|
sb->st_mode, (long long)sb->st_size, ARFMAG);
|
||||||
}
|
}
|
||||||
off_t size = sb->st_size;
|
off_t size = sb->st_size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue