Fix unused variable warnings from clang.

This was preventing ijar and singlejar from building when included in
@bazel_tools in our repo.

Change-Id: I1553e4f3615965cb997579e7d277fb2a08f9b91b
PiperOrigin-RevId: 190840090
diff --git a/src/tools/singlejar/combiners.cc b/src/tools/singlejar/combiners.cc
index 8fd2a0f..1da86e6 100644
--- a/src/tools/singlejar/combiners.cc
+++ b/src/tools/singlejar/combiners.cc
@@ -113,9 +113,11 @@
 
 NullCombiner::~NullCombiner() {}
 
-bool NullCombiner::Merge(const CDH *cdh, const LH *lh) { return true; }
+bool NullCombiner::Merge(const CDH * /*cdh*/, const LH * /*lh*/) {
+  return true;
+}
 
-void *NullCombiner::OutputEntry(bool compress) { return nullptr; }
+void *NullCombiner::OutputEntry(bool /*compress*/) { return nullptr; }
 
 XmlCombiner::~XmlCombiner() {}
 
@@ -171,6 +173,6 @@
 
 PropertyCombiner::~PropertyCombiner() {}
 
-bool PropertyCombiner::Merge(const CDH *cdh, const LH *lh) {
+bool PropertyCombiner::Merge(const CDH * /*cdh*/, const LH * /*lh*/) {
   return false;  // This should not be called.
 }
diff --git a/third_party/ijar/classfile.cc b/third_party/ijar/classfile.cc
index 9d48429..5e163e3 100644
--- a/third_party/ijar/classfile.cc
+++ b/third_party/ijar/classfile.cc
@@ -815,10 +815,8 @@
   };
 
   struct EmptyInfo : TargetInfo {
-    void Write(u1 *&p) {}
-    static EmptyInfo *Read(const u1 *&p) {
-      return new EmptyInfo;
-    }
+    void Write(u1 *& /*p*/) {}
+    static EmptyInfo *Read(const u1 *& /*p*/) { return new EmptyInfo; }
   };
 
   struct MethodFormalParameterInfo : TargetInfo {
@@ -1021,8 +1019,8 @@
 // We preserve Deprecated attributes because they are required by the
 // compiler to generate warning messages.
 struct DeprecatedAttribute : Attribute {
-
-  static DeprecatedAttribute* Read(const u1 *&p, Constant *attribute_name) {
+  static DeprecatedAttribute *Read(const u1 *& /*p*/,
+                                   Constant *attribute_name) {
     DeprecatedAttribute *attr = new DeprecatedAttribute;
     attr->attribute_name_ = attribute_name;
     return attr;
@@ -1126,8 +1124,8 @@
 // See sec.4.7.20 of Java 8 JVM spec. Includes RuntimeVisibleTypeAnnotations
 // and RuntimeInvisibleTypeAnnotations.
 struct TypeAnnotationsAttribute : Attribute {
-  static TypeAnnotationsAttribute* Read(const u1 *&p, Constant *attribute_name,
-                                        u4 attribute_length) {
+  static TypeAnnotationsAttribute *Read(const u1 *&p, Constant *attribute_name,
+                                        u4 /*attribute_length*/) {
     auto attr = new TypeAnnotationsAttribute;
     attr->attribute_name_ = attribute_name;
     u2 num_annotations = get_u2be(p);
@@ -1160,7 +1158,7 @@
 // See JVMS ยง4.7.24
 struct MethodParametersAttribute : Attribute {
   static MethodParametersAttribute *Read(const u1 *&p, Constant *attribute_name,
-                                         u4 attribute_length) {
+                                         u4 /*attribute_length*/) {
     auto attr = new MethodParametersAttribute;
     attr->attribute_name_ = attribute_name;
     u1 parameters_count = get_u1(p);
diff --git a/third_party/ijar/ijar.cc b/third_party/ijar/ijar.cc
index bcbe242..160645d 100644
--- a/third_party/ijar/ijar.cc
+++ b/third_party/ijar/ijar.cc
@@ -76,7 +76,7 @@
   }
 };
 
-bool JarStripperProcessor::Accept(const char* filename, const u4 attr) {
+bool JarStripperProcessor::Accept(const char *filename, const u4 /*attr*/) {
   const size_t filename_len = strlen(filename);
   if (filename_len < CLASS_EXTENSION_LENGTH ||
       strcmp(filename + filename_len - CLASS_EXTENSION_LENGTH,
@@ -96,8 +96,8 @@
   return strcmp(slash, "module-info.class") == 0;
 }
 
-void JarStripperProcessor::Process(const char* filename, const u4 attr,
-                                   const u1* data, const size_t size) {
+void JarStripperProcessor::Process(const char *filename, const u4 /*attr*/,
+                                   const u1 *data, const size_t size) {
   if (verbose) {
     fprintf(stderr, "INFO: StripClass: %s\n", filename);
   }
diff --git a/third_party/ijar/zip.cc b/third_party/ijar/zip.cc
index c5ff929..9a719db 100644
--- a/third_party/ijar/zip.cc
+++ b/third_party/ijar/zip.cc
@@ -147,13 +147,6 @@
   const u1 *file_name_;
   const u1 *extra_field_;
 
-  // Administration of memory reserved for decompressed data. We use the same
-  // buffer for each file to avoid some malloc()/free() calls and free the
-  // memory only in the dtor. C-style memory management is used so that we
-  // can call realloc.
-  u1 *uncompressed_data_;
-  size_t uncompressed_data_allocated_;
-
   // Copy of the last filename entry - Null-terminated.
   char filename[PATH_MAX];
   // The external file attribute field
@@ -599,7 +592,7 @@
 
 // Checks for a zip64 end of central directory record. If a valid zip64 EOCD is
 // found, updates the original EOCD record and returns true.
-bool MaybeReadZip64CentralDirectory(const u1 *bytes, size_t in_length,
+bool MaybeReadZip64CentralDirectory(const u1 *bytes, size_t /*in_length*/,
                                     const u1 *current,
                                     const u1 **end_of_central_dir,
                                     EndOfCentralDirectoryRecord *cd) {