From: Eric Biggers Date: Mon, 6 Feb 2017 01:31:58 +0000 (-0800) Subject: hc_matchfinder, bt_matchfinder: don't use unusual array annotations X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=7c41e3e87d571be88d3d479bd2142d66e6970d9f hc_matchfinder, bt_matchfinder: don't use unusual array annotations sparse doesn't support static and const in array arguments. restrict is okay. Just get rid of them; static is unlikely to help anyway. --- diff --git a/include/wimlib/bt_matchfinder.h b/include/wimlib/bt_matchfinder.h index 05bd07d9..e28d6e0a 100644 --- a/include/wimlib/bt_matchfinder.h +++ b/include/wimlib/bt_matchfinder.h @@ -148,7 +148,7 @@ TEMPLATED(bt_matchfinder_advance_one_byte)(struct TEMPLATED(bt_matchfinder) * co const u32 max_len, const u32 nice_len, const u32 max_search_depth, - u32 next_hashes[const restrict static 2], + u32 next_hashes[restrict 2], u32 * const restrict best_len_ret, struct lz_match * restrict lz_matchptr, const bool record_matches) @@ -330,7 +330,7 @@ TEMPLATED(bt_matchfinder_get_matches)(struct TEMPLATED(bt_matchfinder) *mf, u32 max_len, u32 nice_len, u32 max_search_depth, - u32 next_hashes[static 2], + u32 next_hashes[restrict 2], u32 *best_len_ret, struct lz_match *lz_matchptr) { @@ -358,7 +358,7 @@ TEMPLATED(bt_matchfinder_skip_position)(struct TEMPLATED(bt_matchfinder) *mf, ptrdiff_t cur_pos, u32 nice_len, u32 max_search_depth, - u32 next_hashes[static 2]) + u32 next_hashes[2]) { u32 best_len; TEMPLATED(bt_matchfinder_advance_one_byte)(mf, diff --git a/include/wimlib/hc_matchfinder.h b/include/wimlib/hc_matchfinder.h index b0c8c65a..dccf17ce 100644 --- a/include/wimlib/hc_matchfinder.h +++ b/include/wimlib/hc_matchfinder.h @@ -192,7 +192,7 @@ TEMPLATED(hc_matchfinder_longest_match)(struct TEMPLATED(hc_matchfinder) * const const u32 max_len, const u32 nice_len, const u32 max_search_depth, - u32 next_hashes[const restrict static 2], + u32 next_hashes[restrict 2], u32 * const restrict offset_ret) { const u8 *in_next = in_begin + cur_pos; @@ -359,7 +359,7 @@ TEMPLATED(hc_matchfinder_skip_positions)(struct TEMPLATED(hc_matchfinder) * cons const ptrdiff_t cur_pos, const ptrdiff_t end_pos, const u32 count, - u32 next_hashes[const restrict static 2]) + u32 next_hashes[restrict 2]) { const u8 *in_next = in_begin + cur_pos; const u8 * const stop_ptr = in_next + count;