0001-fix-build-with-gcc-6.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From 06fe4c205094e0b65d3e5d1244f52089ed5bdafb Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
  3. Date: Sun, 25 Sep 2016 23:50:22 +0200
  4. Subject: [PATCH] fix build with gcc-6
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Upstream-Status: Pending
  9. Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
  10. ---
  11. src/archiver_zip.c | 1 -
  12. src/physfs_miniz.h | 3 +++
  13. 2 files changed, 3 insertions(+), 1 deletion(-)
  14. diff --git a/src/archiver_zip.c b/src/archiver_zip.c
  15. index 5c4996d..3b436db 100644
  16. --- a/src/archiver_zip.c
  17. +++ b/src/archiver_zip.c
  18. @@ -845,7 +845,6 @@ static ZIPentry *zip_hash_ancestors(ZIPinfo *info, char *name)
  19. if (sep)
  20. {
  21. const size_t namelen = (sep - name) + 1;
  22. - ZIPentry *parent;
  23. *sep = '\0'; /* chop off last piece. */
  24. retval = zip_find_entry(info, name);
  25. diff --git a/src/physfs_miniz.h b/src/physfs_miniz.h
  26. index 619cb71..fd877c0 100644
  27. --- a/src/physfs_miniz.h
  28. +++ b/src/physfs_miniz.h
  29. @@ -194,6 +194,8 @@ struct tinfl_decompressor_tag
  30. code_len = TINFL_FAST_LOOKUP_BITS; do { temp = (pHuff)->m_tree[~temp + ((bit_buf >> code_len++) & 1)]; } while (temp < 0); \
  31. } sym = temp; bit_buf >>= code_len; num_bits -= code_len; } MZ_MACRO_END
  32. +#pragma GCC diagnostic push
  33. +#pragma GCC diagnostic ignored "-Wmisleading-indentation"
  34. static tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_next, size_t *pIn_buf_size, mz_uint8 *pOut_buf_start, mz_uint8 *pOut_buf_next, size_t *pOut_buf_size, const mz_uint32 decomp_flags)
  35. {
  36. static const int s_length_base[31] = { 3,4,5,6,7,8,9,10,11,13, 15,17,19,23,27,31,35,43,51,59, 67,83,99,115,131,163,195,227,258,0,0 };
  37. @@ -465,6 +467,7 @@ common_exit:
  38. }
  39. return status;
  40. }
  41. +#pragma GCC diagnostic pop
  42. /* Flush values. For typical usage you only need MZ_NO_FLUSH and MZ_FINISH. The other stuff is for advanced use. */
  43. enum { MZ_NO_FLUSH = 0, MZ_PARTIAL_FLUSH = 1, MZ_SYNC_FLUSH = 2, MZ_FULL_FLUSH = 3, MZ_FINISH = 4, MZ_BLOCK = 5 };
  44. --
  45. 2.5.5