diff --git a/include/fc/rpc/state.hpp b/include/fc/rpc/state.hpp index 9019f4c1f..de6f9a36a 100644 --- a/include/fc/rpc/state.hpp +++ b/include/fc/rpc/state.hpp @@ -6,7 +6,7 @@ namespace fc { namespace rpc { struct request { - std::string jsonrpc = "2.0"; + std::string jsonrpc; optional id; std::string method; variants params; diff --git a/src/compress/miniz.c b/src/compress/miniz.c index 7123d6226..fe4eff675 100644 --- a/src/compress/miniz.c +++ b/src/compress/miniz.c @@ -1497,7 +1497,10 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex { mz_uint8 *p = r->m_tables[0].m_code_size; mz_uint i; r->m_table_sizes[0] = 288; r->m_table_sizes[1] = 32; TINFL_MEMSET(r->m_tables[1].m_code_size, 5, 32); - for ( i = 0; i <= 143; ++i) *p++ = 8; for ( ; i <= 255; ++i) *p++ = 9; for ( ; i <= 279; ++i) *p++ = 7; for ( ; i <= 287; ++i) *p++ = 8; + for ( i = 0; i <= 143; ++i) *p++ = 8; + for ( ; i <= 255; ++i) *p++ = 9; + for ( ; i <= 279; ++i) *p++ = 7; + for ( ; i <= 287; ++i) *p++ = 8; } else { @@ -2264,10 +2267,11 @@ static int tdefl_flush_block(tdefl_compressor *d, int flush) #define TDEFL_READ_UNALIGNED_WORD(p) *(const mz_uint16*)(p) static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahead_pos, mz_uint max_dist, mz_uint max_match_len, mz_uint *pMatch_dist, mz_uint *pMatch_len) { - mz_uint dist, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; + mz_uint dist = 0, pos = lookahead_pos & TDEFL_LZ_DICT_SIZE_MASK, match_len = *pMatch_len, probe_pos = pos, next_probe_pos, probe_len; mz_uint num_probes_left = d->m_max_probes[match_len >= 32]; const mz_uint16 *s = (const mz_uint16*)(d->m_dict + pos), *p, *q; - mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s); + mz_uint8 *c01_src = &d->m_dict[pos + match_len - 1]; + mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(c01_src), s01 = TDEFL_READ_UNALIGNED_WORD(s); MZ_ASSERT(max_match_len <= TDEFL_MAX_MATCH_LEN); if (max_match_len <= match_len) return; for ( ; ; ) { @@ -2275,13 +2279,19 @@ static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahe { if (--num_probes_left == 0) return; #define TDEFL_PROBE \ + { \ next_probe_pos = d->m_next[probe_pos]; \ if ((!next_probe_pos) || ((dist = (mz_uint16)(lookahead_pos - next_probe_pos)) > max_dist)) return; \ probe_pos = next_probe_pos & TDEFL_LZ_DICT_SIZE_MASK; \ - if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break; + mz_uint8 *c01_check = &d->m_dict[probe_pos + match_len - 1]; \ + if (TDEFL_READ_UNALIGNED_WORD(c01_check) == c01) break; \ + } TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE; } - if (!dist) break; q = (const mz_uint16*)(d->m_dict + probe_pos); if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; p = s; probe_len = 32; + if (!dist) break; + q = (const mz_uint16*)(d->m_dict + probe_pos); + if (TDEFL_READ_UNALIGNED_WORD(q) != s01) continue; + p = s; probe_len = 32; do { } while ( (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (TDEFL_READ_UNALIGNED_WORD(++p) == TDEFL_READ_UNALIGNED_WORD(++q)) && (--probe_len > 0) ); if (!probe_len) @@ -2291,7 +2301,8 @@ static MZ_FORCEINLINE void tdefl_find_match(tdefl_compressor *d, mz_uint lookahe else if ((probe_len = ((mz_uint)(p - s) * 2) + (mz_uint)(*(const mz_uint8*)p == *(const mz_uint8*)q)) > match_len) { *pMatch_dist = dist; if ((*pMatch_len = match_len = MZ_MIN(max_match_len, probe_len)) == max_match_len) break; - c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]); + mz_uint8 *c01_check = &d->m_dict[probe_pos + match_len - 1]; + c01 = TDEFL_READ_UNALIGNED_WORD(c01_check); } } } diff --git a/src/rpc/cli.cpp b/src/rpc/cli.cpp index 81438b5c9..055d704e8 100644 --- a/src/rpc/cli.cpp +++ b/src/rpc/cli.cpp @@ -165,6 +165,10 @@ char* my_generator(const char* text, int state) } +#ifdef __GNUC__ +static char** cli_completion( const char * text , int start, int end) __attribute__ ((unused)); +#endif + static char** cli_completion( const char * text , int start, int end) { char **matches; diff --git a/src/thread/context.hpp b/src/thread/context.hpp index 31bfbaaa0..99330f18f 100644 --- a/src/thread/context.hpp +++ b/src/thread/context.hpp @@ -8,6 +8,9 @@ #include +#define BOOST_COROUTINES_NO_DEPRECATION_WARNING // Boost 1.61 +#define BOOST_COROUTINE_NO_DEPRECATION_WARNING // Boost 1.62 + #if BOOST_VERSION >= 105400 # include namespace bc = boost::context; @@ -97,7 +100,7 @@ namespace fc { } context( fc::thread* t) : -#if BOOST_VERSION >= 105600 && BOOST_VERSION <= 106100 +#if BOOST_VERSION >= 105600 my_context(nullptr), #elif BOOST_VERSION >= 105300 my_context(new bc::fcontext_t),