Index: import/cross/tar_generator.cc |
=================================================================== |
--- import/cross/tar_generator.cc (revision 21208) |
+++ import/cross/tar_generator.cc (working copy) |
@@ -107,7 +107,8 @@ |
::snprintf(p + kGroupIDOffset, 8, "%07o", 0204); |
// File size |
- ::snprintf(p + kFileSizeOffset, 12, "%011o", file_size); |
+ ::snprintf(p + kFileSizeOffset, 12, "%011o", |
+ static_cast<unsigned int>(file_size)); |
// Modification time |
// TODO: write the correct current time here... |
@@ -148,7 +149,7 @@ |
checksum += header[i]; |
} |
snprintf(reinterpret_cast<char*>(header + kHeaderCheckSumOffset), |
- 8, "%06o\0\0", checksum); |
+ 8, "%06o%c%c", checksum, 0, 0); |
} |
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |