search: 'len' is unused in release builds (it's only used in an assert)

This commit is contained in:
Daniel Eklöf 2019-08-27 19:58:31 +02:00
parent c1bbb64a4d
commit c3b5fa82be
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -54,7 +54,7 @@ search_update(struct terminal *term)
int start_row = term->search.match.row;
int start_col = term->search.match.col;
size_t len = term->search.match_len;
size_t len __attribute__((unused)) = term->search.match_len;
assert((len == 0 && start_row == -1 && start_col == -1) ||
(len > 0 && start_row >= 0 && start_col >= 0));