summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorPaul Kunysch <kunysch@me.com>2013-03-05 19:16:11 (GMT)
committerBrad King <brad.king@kitware.com>2013-03-22 12:53:58 (GMT)
commit0fca1543445409f3c4a5f3946999bd4dfde46964 (patch)
treeac098d108c60c7ba460269b120b0130d32fddd3c /Source/CPack
parentaa16a433d3634d668c211b1aa5b13271b85dffc8 (diff)
downloadCMake-0fca1543445409f3c4a5f3946999bd4dfde46964.zip
CMake-0fca1543445409f3c4a5f3946999bd4dfde46964.tar.gz
CMake-0fca1543445409f3c4a5f3946999bd4dfde46964.tar.bz2
CPack: Avoid "format expects 'unsigned int'" warnings
Cast sprintf uid and gid arguments to match the type expected by their "%-6u" format strings.
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index f99db58..4494e8a 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -771,13 +771,13 @@ static int put_arobj(CF *cfp, struct stat *sb)
}
if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
(void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname,
- (long int)sb->st_mtime, uid, gid, sb->st_mode,
- (long long)sb->st_size + lname, ARFMAG);
+ (long int)sb->st_mtime, (unsigned)uid, (unsigned)gid,
+ sb->st_mode, (long long)sb->st_size + lname, ARFMAG);
else {
lname = 0;
(void)sprintf(ar_hb, HDR2, name,
- (long int)sb->st_mtime, uid, gid, sb->st_mode,
- (long long)sb->st_size, ARFMAG);
+ (long int)sb->st_mtime, (unsigned)uid, (unsigned)gid,
+ sb->st_mode, (long long)sb->st_size, ARFMAG);
}
off_t size = sb->st_size;