Merge "Remove extra definition of AIDL"
diff --git a/tools/ijar/Android.mk b/tools/ijar/Android.mk
index 36f000c..8b2a02c 100644
--- a/tools/ijar/Android.mk
+++ b/tools/ijar/Android.mk
@@ -8,7 +8,7 @@
include $(CLEAR_VARS)
LOCAL_CPP_EXTENSION := .cc
LOCAL_SRC_FILES := classfile.cc ijar.cc zip.cc
-LOCAL_CFLAGS += -Wall
+LOCAL_CFLAGS += -Wall -Werror
LOCAL_SHARED_LIBRARIES := libz-host
LOCAL_MODULE := ijar
# libc++ is not supported for TARGET_BUILD_APPS builds
diff --git a/tools/ijar/classfile.cc b/tools/ijar/classfile.cc
index 5d12cc2..e0cf42e 100644
--- a/tools/ijar/classfile.cc
+++ b/tools/ijar/classfile.cc
@@ -483,12 +483,12 @@
// We keep an entry if the constant referring to the inner class is already
// kept. Then we mark its outer class and its class name as kept, too, then
// iterate until a fixed point is reached.
- int entry_count;
+ size_t entry_count;
int iteration = 0;
do {
entry_count = kept_entries.size();
- for (int i_entry = 0; i_entry < entries_.size(); ++i_entry) {
+ for (size_t i_entry = 0; i_entry < entries_.size(); ++i_entry) {
Entry* entry = entries_[i_entry];
if (entry->inner_class_info->Kept() ||
used_class_names.find(entry->inner_class_info->Display())
@@ -632,7 +632,7 @@
}
virtual void ExtractClassNames() {
- for (int i = 0; i < values_.size(); i++) {
+ for (size_t i = 0; i < values_.size(); i++) {
values_[i]->ExtractClassNames();
}
}
@@ -800,8 +800,8 @@
};
struct EmptyInfo : TargetInfo {
- void Write(u1 *&p) {}
- static EmptyInfo *Read(const u1 *&p) {
+ void Write(u1 *&) {}
+ static EmptyInfo *Read(const u1 *&) {
return new EmptyInfo;
}
};
@@ -1007,7 +1007,7 @@
// compiler to generate warning messages.
struct DeprecatedAttribute : Attribute {
- static DeprecatedAttribute* Read(const u1 *&p, Constant *attribute_name) {
+ static DeprecatedAttribute* Read(const u1 *&, Constant *attribute_name) {
DeprecatedAttribute *attr = new DeprecatedAttribute;
attr->attribute_name_ = attribute_name;
return attr;
@@ -1041,7 +1041,7 @@
}
virtual void ExtractClassNames() {
- for (int i = 0; i < annotations_.size(); i++) {
+ for (size_t i = 0; i < annotations_.size(); i++) {
annotations_[i]->ExtractClassNames();
}
}
@@ -1112,7 +1112,7 @@
// and RuntimeInvisibleTypeAnnotations.
struct TypeAnnotationsAttribute : Attribute {
static TypeAnnotationsAttribute* Read(const u1 *&p, Constant *attribute_name,
- u4 attribute_length) {
+ u4) {
auto attr = new TypeAnnotationsAttribute;
attr->attribute_name_ = attribute_name;
u2 num_annotations = get_u2be(p);
@@ -1124,7 +1124,7 @@
}
virtual void ExtractClassNames() {
- for (int i = 0; i < type_annotations_.size(); i++) {
+ for (size_t i = 0; i < type_annotations_.size(); i++) {
type_annotations_[i]->ExtractClassNames();
}
}
@@ -1181,7 +1181,7 @@
}
void ExtractClassNames() {
- for (int i = 0; i < attributes.size(); i++) {
+ for (size_t i = 0; i < attributes.size(); i++) {
attributes[i]->ExtractClassNames();
}
}
@@ -1739,7 +1739,7 @@
members.insert(members.end(), fields.begin(), fields.end());
members.insert(members.end(), methods.begin(), methods.end());
ExtractClassNames();
- for (int i = 0; i < members.size(); i++) {
+ for (size_t i = 0; i < members.size(); i++) {
Member *member = members[i];
size_t idx = 0;
devtools_ijar::ExtractClassNames(member->descriptor->Display(), &idx);
diff --git a/tools/releasetools/edify_generator.py b/tools/releasetools/edify_generator.py
index b3785ac..d923cc8 100644
--- a/tools/releasetools/edify_generator.py
+++ b/tools/releasetools/edify_generator.py
@@ -284,8 +284,8 @@
cmd = ['apply_patch("%s",\0"%s",\0%s,\0%d'
% (srcfile, tgtfile, tgtsha1, tgtsize)]
for i in range(0, len(patchpairs), 2):
- cmd.append(',\0%s, package_extract_file("%s")' % patchpairs[i:i+2])
- cmd.append(');')
+ cmd.append(',\0%s,\0package_extract_file("%s")' % patchpairs[i:i+2])
+ cmd.append(') ||\n abort("Failed to apply patch to %s");' % (srcfile,))
cmd = "".join(cmd)
self.script.append(self.WordWrap(cmd))
diff --git a/tools/releasetools/ota_from_target_files.py b/tools/releasetools/ota_from_target_files.py
index 1b279e5..5259ede 100755
--- a/tools/releasetools/ota_from_target_files.py
+++ b/tools/releasetools/ota_from_target_files.py
@@ -1572,13 +1572,13 @@
if OPTIONS.verify and system_diff:
script.Print("Remounting and verifying system partition files...")
script.Unmount("/system")
- script.Mount("/system")
+ script.Mount("/system", recovery_mount_options)
system_diff.EmitExplicitTargetVerification(script)
if OPTIONS.verify and vendor_diff:
script.Print("Remounting and verifying vendor partition files...")
script.Unmount("/vendor")
- script.Mount("/vendor")
+ script.Mount("/vendor", recovery_mount_options)
vendor_diff.EmitExplicitTargetVerification(script)
script.AddToZip(target_zip, output_zip, input_path=OPTIONS.updater_binary)