Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: import/cross/tar_generator.cc

Issue 159168: This fixes a number of things that are warnings in the Mac compiler.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Powered by Google App Engine
This is Rietveld 408576698