summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2015-04-17 14:07:52 -0700
committerElliott Hughes <enh@google.com>2015-04-17 14:07:52 -0700
commit2940ccff8605e929cc56353254f29f37823fdda7 (patch)
treefaa184e9831acd9edec8370d7c06e210240a3dc6
parent3538b40942b65927e65b446bca9842a9f915c5e3 (diff)
downloadsystem_core-2940ccff8605e929cc56353254f29f37823fdda7.zip
system_core-2940ccff8605e929cc56353254f29f37823fdda7.tar.gz
system_core-2940ccff8605e929cc56353254f29f37823fdda7.tar.bz2
Use PRI* macros to fix the Windows build.
Change-Id: Icd400be05c2bc726265832875b5a05dba7966847
-rw-r--r--adb/commandline.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/adb/commandline.cpp b/adb/commandline.cpp
index 78d43e5..ddb52e2 100644
--- a/adb/commandline.cpp
+++ b/adb/commandline.cpp
@@ -21,6 +21,7 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
+#include <inttypes.h>
#include <limits.h>
#include <stdarg.h>
#include <stdint.h>
@@ -1897,7 +1898,7 @@ int install_multiple_app(transport_type transport, const char* serial, int argc,
{
int i;
struct stat sb;
- unsigned long long total_size = 0;
+ uint64_t total_size = 0;
// Find all APK arguments starting at end.
// All other arguments passed through verbatim.
@@ -1923,7 +1924,7 @@ int install_multiple_app(transport_type transport, const char* serial, int argc,
return 1;
}
- std::string cmd = android::base::StringPrintf("exec:pm install-create -S %lld", total_size);
+ std::string cmd = android::base::StringPrintf("exec:pm install-create -S %" PRIu64, total_size);
for (i = 1; i < first_apk; i++) {
cmd += " ";
cmd += escape_arg(argv[i]);
@@ -1964,8 +1965,9 @@ int install_multiple_app(transport_type transport, const char* serial, int argc,
goto finalize_session;
}
- std::string cmd = android::base::StringPrintf("exec:pm install-write -S %lld %d %d_%s -",
- (long long int) sb.st_size, session_id, i, get_basename(file));
+ std::string cmd = android::base::StringPrintf(
+ "exec:pm install-write -S %" PRIu64 " %d %d_%s -",
+ static_cast<uint64_t>(sb.st_size), session_id, i, get_basename(file));
int localFd = adb_open(file, O_RDONLY);
if (localFd < 0) {