androidfw: resolve 64-bit build issues
- uid_t/gid_t cast to unsigned long
- unused argument warnings
- tab and space requirements
Change-Id: Ib446d8165b9082be02edb55e6b71fd1a03ea3431
diff --git a/libs/androidfw/BackupHelpers.cpp b/libs/androidfw/BackupHelpers.cpp
index 302fbf6..ab837ad 100644
--- a/libs/androidfw/BackupHelpers.cpp
+++ b/libs/androidfw/BackupHelpers.cpp
@@ -568,8 +568,8 @@
// [ 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 @@
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) {