diff options
author | Jay Krell <jaykrell@microsoft.com> | 2018-02-19 03:42:25 -0800 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2018-02-22 00:44:58 +0300 |
commit | 4b76d1539641df88da5c1dedc8f741e69b32f21c (patch) | |
tree | 32412496e630e060ccc7427058876865e4d763ea /cord/tests | |
parent | 1247f597253ccec8307729ec02c0630af7732aba (diff) | |
download | bdwgc-4b76d1539641df88da5c1dedc8f741e69b32f21c.tar.gz |
Eliminate C++ warning about deprecated register keyword (cord)
Issue #206 (bdwgc).
* cord/cordbscs.c (CORD_dump_inner, CORD_cat_char_star, CORD_cat,
CORD_from_fn_inner, CORD_index_access_fn, CORD_apply_access_fn,
CORD_substr_closure, CORD_substr_checked, CORD_substr, CORD_iter5,
CORD_riter4, CORD_init_min_len, CORD_init_forest, CORD_add_forest,
CORD_concat_forest, CORD_balance_insert, CORD_balance,
CORD__extend_path, CORD__pos_fetch, CORD__next, CORD__prev,
CORD_pos_fetch: Remove register keyword for local variables (and
function parameters).
* cord/cordprnt.c (extract_conv_spec, CORD_vsprintf): Likewise.
* cord/cordxtra.c (CORD_cat_char, CORD_catn, CORD_fill_proc,
CORD_batched_fill_proc, CORD_cmp, CORD_ncmp, CORD_to_char_star,
CORD_put_proc, CORD_batched_put_proc, CORD_chr_proc, CORD_rchr_proc,
CORD_batched_chr_proc, CORD_str, CORD_ec_flush_buf,
CORD_from_file_eager, refill_cache, CORD_lf_func,
CORD_from_file_lazy_inner, CORD_from_file_lazy, CORD_from_file):
Likewise.
* cord/tests/cordtest.c (test_basics, test_extras): Likewise.
* cord/tests/de.c (retrieve_line, redisplay): Likewise.
* cord/tests/de_win.c (plain_chars, control_chars, WndProc): Likewise.
Diffstat (limited to 'cord/tests')
-rw-r--r-- | cord/tests/cordtest.c | 4 | ||||
-rw-r--r-- | cord/tests/de.c | 6 | ||||
-rw-r--r-- | cord/tests/de_win.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/cord/tests/cordtest.c b/cord/tests/cordtest.c index e05e6a5b..8de6980f 100644 --- a/cord/tests/cordtest.c +++ b/cord/tests/cordtest.c @@ -65,7 +65,7 @@ char id_cord_fn(size_t i, void * client_data) void test_basics(void) { CORD x = CORD_from_char_star("ab"); - register int i; + int i; CORD y; CORD_pos p; @@ -148,7 +148,7 @@ void test_extras(void) { # define FNAME1 "cordtst1.tmp" /* short name (8+3) for portability */ # define FNAME2 "cordtst2.tmp" - register int i; + int i; CORD y = "abcdefghijklmnopqrstuvwxyz0123456789"; CORD x = "{}"; CORD u, w, z; diff --git a/cord/tests/de.c b/cord/tests/de.c index 01cc5c57..321296c5 100644 --- a/cord/tests/de.c +++ b/cord/tests/de.c @@ -271,7 +271,7 @@ CORD retrieve_line(CORD s, size_t pos, unsigned column) CORD retrieve_screen_line(int i) { - register size_t pos; + size_t pos; invalidate_map(dis_line + LINES); /* Prune search */ pos = line_pos(dis_line + i, 0); @@ -283,12 +283,12 @@ CORD retrieve_line(CORD s, size_t pos, unsigned column) /* Display the visible section of the current file */ void redisplay(void) { - register int i; + int i; invalidate_map(dis_line + LINES); /* Prune search */ for (i = 0; i < LINES; i++) { if (need_redisplay == ALL || need_redisplay == i) { - register size_t pos = line_pos(dis_line + i, 0); + size_t pos = line_pos(dis_line + i, 0); if (pos == CORD_NOT_FOUND) break; replace_line(i, retrieve_line(current, pos, dis_col)); diff --git a/cord/tests/de_win.c b/cord/tests/de_win.c index d99942ec..24f0a6e2 100644 --- a/cord/tests/de_win.c +++ b/cord/tests/de_win.c @@ -121,7 +121,7 @@ int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char * plain_chars(char * text, size_t len) { char * result = (char *)GC_MALLOC_ATOMIC(len + 1); - register size_t i; + size_t i; if (NULL == result) return NULL; for (i = 0; i < len; i++) { @@ -140,7 +140,7 @@ char * plain_chars(char * text, size_t len) char * control_chars(char * text, size_t len) { char * result = (char *)GC_MALLOC_ATOMIC(len + 1); - register size_t i; + size_t i; if (NULL == result) return NULL; for (i = 0; i < len; i++) { @@ -208,7 +208,7 @@ LRESULT CALLBACK WndProc (HWND hwnd, UINT message, RECT this_line; RECT dummy; TEXTMETRIC tm; - register int i; + int i; int id; switch (message) |