diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-03-19 11:00:06 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-03-19 11:11:14 -0700 |
commit | 00adb8685ee996f9d2650d617c8c0e98f13ef406 (patch) | |
tree | b3bd40533e240cd3258de89c9541037c16f9fadd /libs/androidfw/BackupHelpers.cpp | |
parent | 7cb1dfe690b2d700ce212712287dfd59c2c8e43f (diff) |
androidfw: resolve 64-bit build issues
- uid_t/gid_t cast to unsigned long
- unused argument warnings
- tab and space requirements
Change-Id: Ib446d8165b9082be02edb55e6b71fd1a03ea3431
Diffstat (limited to 'libs/androidfw/BackupHelpers.cpp')
-rw-r--r-- | libs/androidfw/BackupHelpers.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/androidfw/BackupHelpers.cpp b/libs/androidfw/BackupHelpers.cpp index 302fbf63af52..ab837ad71cbf 100644 --- a/libs/androidfw/BackupHelpers.cpp +++ b/libs/androidfw/BackupHelpers.cpp @@ -568,8 +568,8 @@ int write_tarfile(const String8& packageName, const String8& domain, // [ 108 : 8 ] uid -- ignored in Android format; uids are remapped at restore time // [ 116 : 8 ] gid -- ignored in Android format - snprintf(buf + 108, 8, "0%lo", s.st_uid); - snprintf(buf + 116, 8, "0%lo", s.st_gid); + snprintf(buf + 108, 8, "0%lo", (unsigned long)s.st_uid); + snprintf(buf + 116, 8, "0%lo", (unsigned long)s.st_gid); // [ 124 : 12 ] file size in bytes if (s.st_size > 077777777777LL) { @@ -778,7 +778,7 @@ RestoreHelperBase::WriteFile(const String8& filename, BackupDataReader* in) ALOGW("Could not open file %s -- %s", filename.string(), strerror(errno)); return errno; } - + while ((amt = in->ReadEntityData(buf, RESTORE_BUF_SIZE)) > 0) { err = write(fd, buf, amt); if (err != amt) { |