Mercurial > hg > early-roguelike
diff rogue4/list.c @ 215:1b73a8641b37
rogue4: fix most GCC5 warnings.
Converting all function definitions to ANSI style accounts for most of
the change. This has exposed other problems, such as daemons not
actually being their stated type, that will require more careful
solutions.
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 Jan 2016 19:41:05 -0500 |
parents | 9535a08ddc39 |
children |
line wrap: on
line diff
--- a/rogue4/list.c Sat Jan 23 09:35:14 2016 -0500 +++ b/rogue4/list.c Wed Jan 27 19:41:05 2016 -0500 @@ -18,8 +18,8 @@ * detach: * Takes an item out of whatever linked list it might be in */ -_detach(list, item) -register THING **list, *item; +void +_detach(THING **list, THING *item) { if (*list == item) *list = next(item); @@ -33,8 +33,8 @@ * _attach: * add an item to the head of a list */ -_attach(list, item) -register THING **list, *item; +void +_attach(THING **list, THING *item) { if (*list != NULL) { @@ -54,8 +54,8 @@ * _free_list: * Throw the whole blamed thing away */ -_free_list(ptr) -register THING **ptr; +void +_free_list(THING **ptr) { register THING *item; @@ -71,8 +71,8 @@ * discard: * Free up an item */ -discard(item) -register THING *item; +void +discard(THING *item) { total--; free((char *) item); @@ -83,7 +83,7 @@ * Get a new item with a specified size */ THING * -new_item() +new_item(void) { register THING *item;