unused variable patch in modules/woff2/src/woff2_dec.cc draft
authorISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
Sat, 09 Nov 2019 10:59:59 +0900
changeset 81066 689d1f0b5de889dfce734cda40753ddea4646f8f
parent 81065 9547b7a1d2bb1ec854775bb969e643f7099e8e9f
child 81067 612a9d760177fb896e2c29c5dda0c00995a75087
push id9744
push userishikawa@yk.rim.or.jp
push dateSat, 09 Nov 2019 02:01:06 +0000
treeherdertry-comm-central@56c83244ac0e [default view] [failures only]
unused variable patch in modules/woff2/src/woff2_dec.cc
mozilla-M-C-004-modules-unused-variable.patch
new file mode 100644
--- /dev/null
+++ b/mozilla-M-C-004-modules-unused-variable.patch
@@ -0,0 +1,39 @@
+# HG changeset patch
+# User ISHIKAWA, Chiaki <ishikawa@yk.rim.or.jp>
+# Parent  27068435c2434b6e719315662b4b7aed94a91c75
+unused variable patch in modules/woff2/src/woff2_dec.cc
+
+diff --git a/modules/woff2/src/woff2_dec.cc b/modules/woff2/src/woff2_dec.cc
+--- a/modules/woff2/src/woff2_dec.cc
++++ b/modules/woff2/src/woff2_dec.cc
+@@ -1161,26 +1161,29 @@ bool ReadWOFF2Header(const uint8_t* data
+         fprintf(stderr, "TTC font %d has non-consecutive glyf/loca\n", i);
+ #endif
+           return FONT_COMPRESSION_FAILURE();
+         }
+       }
+     }
+   }
+ 
++#ifdef FONT_COMPRESSION_BIN
+   const uint64_t first_table_offset = ComputeOffsetToFirstTable(*hdr);
++#endif
+ 
+   hdr->compressed_offset = file.offset();
+   if (PREDICT_FALSE(hdr->compressed_offset >
+                     std::numeric_limits<uint32_t>::max())) {
+     return FONT_COMPRESSION_FAILURE();
+   }
+   uint64_t src_offset = Round4(hdr->compressed_offset + hdr->compressed_length);
++#ifdef FONT_COMPRESSION_BIN
+   uint64_t dst_offset = first_table_offset;
+-
++#endif
+ 
+   if (PREDICT_FALSE(src_offset > length)) {
+ #ifdef FONT_COMPRESSION_BIN
+     fprintf(stderr, "offset fail; src_offset %" PRIu64 " length %lu "
+       "dst_offset %" PRIu64 "\n",
+       src_offset, length, dst_offset);
+ #endif
+     return FONT_COMPRESSION_FAILURE();